CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!



Zone: > NEWSGROUP > Asp.Net Forum > windows_hosting.hosting_open_forum Tags:
Item Type: NewsGroup Date Entered: 12/7/2004 3:45:37 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 4 Views: 17 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
5 Items, 1 Pages 1 |< << Go >> >|
EvanCamilleri
Asp.Net User
2 issues in Builing Custom Controls.12/7/2004 3:45:37 PM

0/0

I am builing a Custom Control and have the following issues:

::1::
I need to add properties to the <body> tag of the main form in which this control resides, so that it finally reads:

<BODY onload="controlfunc()">

or if the parent has already something in the onload:

<BODY onload="parentfunc();controlfunc()">


::2::
I need to add some 'HTML' between the body and the form tags, so that it finally reads:

<BODY onload="LoadDiv()">
<OBJECT id="dlgHelper" height="0px" width="0px" classid="clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b" VIEWASTEXT></OBJECT>
<form id="Form1" method="post" runat="server">

Since if I put this <object> inside the form tag, it does not work!


Thanks for your help!


Evan Camilleri

Holistic Research And Development Limited

Holistic Institute of Technologies

Malta - Europe



www.holistic.com.mt
widgetninja
Asp.Net User
Re: 2 issues in Builing Custom Controls.12/8/2004 12:10:01 AM

0/0

the first one is easy:

Page.registerStartupScript("startup", "<script> somefunction()</script>")


is equivalent to what you want. Now you could learn how to attach and remove handlers in javascript... but it's not necessary in your case (OnLoad Event).

the second one... Wow, you actually have someone that's letting you run COM objects on the client? Nobody has let me do this for almost a decade! Haven't done it in .NET, so I can't help. However, if it's worth a few hundred bucks to you, you can buy Infragistics' suite with source code and see how their designers are adding attributes to the body tag at design time to support intellisense... the same technique applies to this.

Underpaid, painfully underutilized, and always looking for more work in Va.
EvanCamilleri
Asp.Net User
Re: 2 issues in Builing Custom Controls.12/8/2004 11:02:18 AM

0/0

No it does not work!

I do not want to put the script, that's not a problem.

I want to programatically set the onload attribute of the body tag!

:(
Evan Camilleri

Holistic Research And Development Limited

Holistic Institute of Technologies

Malta - Europe



www.holistic.com.mt
widgetninja
Asp.Net User
Re: 2 issues in Builing Custom Controls.12/8/2004 9:03:05 PM

0/0

Hold on there guy. I never give INCORRECT advice. What I said to do does work, and was equivalent in your particular case...using the onLoad event.

Programmatically setting the onload does exactly the same thing as I outlined, in terms of results... so long as order of execution doesn't matter... because you would have to emit them in that order.

If order of execution does matter, then it is as simple as doing what I said, except using something similarto the following script in place of the simple function call.


var currentHandlers = document.body.getAttribute("onload");
currentHandlers += "YourNewFunction();"
document.body.setAttribute("onload", currentHandlers);


Or you can do what I said and use attachHandler/detachHandler. Search your Visual studio help. It's in there. I assumed that since you didn't know about them, I would give you the easy way out.

What you were probably trying to do is actually set the handler, which is expecting a function pointer. OnLoad is both an event, and an attribute.


Underpaid, painfully underutilized, and always looking for more work in Va.
EvanCamilleri
Asp.Net User
Re: 2 issues in Builing Custom Controls.12/9/2004 9:13:52 AM

0/0

ok thanks.

If I understand well then everything must be done on client side.

In the meantime I actually did it 'the complicated way', by getting the headers up till just before the form as a ResourceBasedLiteralControl, changing it to a LiteralControl, parsing it and adding what I need.

But your way is simpler..... so better

But I think this is the way to solve my second problem, though I will also try to avoid COM controls.

Thanks
:)

p.s. I do not know how much you get, most probably more than me since here in Malta we are really underpaid..... but in any case I agree: you are underpaid and painfully underutilized :)
Evan Camilleri

Holistic Research And Development Limited

Holistic Institute of Technologies

Malta - Europe



www.holistic.com.mt
5 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Professional ASP.NET 2.0 Server Control and Component Development Authors: Shahram Khosravi, Pages: 1186, Published: 2006
Visual Basic 2005 Programmer's Reference Authors: Rod Stephens, Pages: 1022, Published: 2005
Programming ASP.NET: Building Web Applications and Services with ASP.NET 2.0 Authors: Jesse Liberty, Dan Hurwitz, Pages: 930, Published: 2005
Essential ASP.NET with Examples in Visual Basic .NET: With Examples in Visual Basic.Net Authors: Fritz Onion, Pages: 395, Published: 2003
Visual Basic 2005 with .NET 3.0 Programmer's Reference: Programmer's Reference Authors: Rod Stephens, Pages: 1200, Published: 2007
Professional Web Parts and Custom Controls with ASP.NET 2.0 Authors: Peter Vogel, Pages: 449, Published: 2005
Geek House: 10 Hardware Hacking Projects for Around Home Authors: Barry Press, Marcia Press, Pages: 304, Published: 2005
Pro ASP. Net 3. 5 Server Controls and AJAX Components Authors: Rob Cameron, Dale Michalk, Pages: 740, Published: 2008
Foundation Expression Blend 2: Building Applications in WPF and Silverlight: Building Applications in WPF and Silverlight Authors: Victor Gaudioso, Pages: 349, Published: 2008
Microsoft Sharepoint: Building Office 2007 Solutions in C# 2005 Authors: Scot Hillier, Pages: 513, Published: 2007

Web:
15 Seconds : Building ASP.NET User and Server Controls, Part 2 Solomon Shaffer explains custom controls, describes the complexities and issues surrounding building such controls, and walks through a useful example.
Building a Simple Custom Control in Silverlight 2 | Adam Kinney ... Jun 30, 2008 ... For a deeper look at creating custom controls I would recommend Karen Corby's 4 part Parts & States Model with VisualStateManager. ...
Developing Custom Controls in Silverlight 2 2: Preparing. Now that the setup is complete we can start building the control but first we need to focus and gather facts about the custom control. ...
Amazon.com: Professional ASP.NET Server Controls: Building Custom ... NET Server Controls: Building Custom Controls with C#: MAtt Butler, Thiru Thangarathinam, ... i.e., each book must be in subject 1 AND subject 2 AND . ...
Wicked Code: Craft Custom Controls for Silverlight 2 The best way to learn about Silverlight 2 custom controls is to build one—step by step, ..... you should have no problem building controls of your own. ...
John's Blog | XPages Example: Building a Custom Control - How to ... XPages Example: Building a Custom Control - How to build a Custom ... please note: There are a few issues with Beta 2 that prevent this example from working ...
CodeProject: Building a UNIX Time to Date Custom Control in C# ... Jun 6, 2008 ... As you can see from Figure 2, there are two projects. UnixTime is the custom control project and it contains a single custom control ...
Building custom user control in Silverlight 2.0 + how to build ... http://blogs.microsoft.co.il/blogs/tamir/archive/2008/03/07/building-custom-user -control-in-silverlight-2-0-how-to-build-code-snippet-for-vs-as-bonus.aspx ...
Videos : The Official Microsoft Silverlight Site Dec 6, 2008 ... BUILDING A SKINNABLE CUSTOM CONTROL, PART 2, RSS. Jesse Liberty continues to explore custom controls in depth; this time taking a detailed ...
Building Custom Controls - ng.asp-net-forum.windows ... Building Custom Controls, > ROOT > NEWSGROUP > Asp.Net Forum > windows_hosting. hosting_open_forum, Date: 9/30/2004 4:58:13 AM, Replies: 2, Views: 46, ...

Videos:
building your own custom computer part II (2) custom computer
FlightCheck: Ground Controls Part 2 Ground Controls Part 2 Building a custom Ground Control set based on an existing set within your FlightCheck Professional. This is the easiest ...
How Tidewater Custom Modular Homes manufactures custom ... Why is off-site, stick-built home construction better? With a 120,000 sq. ft. climate controlled facility, a dedicated work force and thoroughly ...
Custom Built Modular Jib / Crane / Boom Arm *NEW* Due to the responses I have gotten from this video, I am going to draw up a step-by-step tutorial on how to build your own high quality jib ...
Roebling Road 2 - Sandy Heath Chasing a STI at Roebling Road. I think this guy let me by cause he wanted to see how the Mustang was keeping up. After the session he told me the ...
Superwinch Superwinch- Thirty-six years ago in the northeast hills of Connecticut, Frank Tolsdorf began manufacturing Superwinch electric winches. His ...
Custom Crafted Cigar Box Guitar by D Guitars Miami Well folks, fresh off the workbench!! Here we have a custom crafted Cohibacaster cigar box guitar built by Master luthier Doron Markowitz of D ...
11-Attaching Ailerons Part 2 - Building HZ Super Cub from Scratch A series of videos of how to scratch build your HZ Super Cub. In these videos I'll show you how to do simple mods to strengthen the stock ...
HANDBOOK FOR THE NEW PARADIGM prologue 8 Prologue 8 When the conditions of deterioration surround you, how can I comment that this is a glorious day? Indeed, it is, for those ...
6-Cutting out the Ailerons Part 2 - Building HZ Super Cub ... A series of videos of how to scratch build your HZ Super Cub. In these videos I'll show you how to do simple mods to strengthen the stock ...




Search This Site:










updating references... how do you?

left pane / content pane / right pane help needed

displaying parent portal tabs in sub portal

db name and future upgrade

new user needs help with remote install

how do i change the logo?

favicon

creating portal

system requirements for dotnetnuke installation

looking for a good tutorial of how to make dnn modules

system.nullreferenceexception error

what is the portals/guid folder?

just general n00bie questions after searching the net for 4 hours

assembly version ( [assemblyversion] ) does not match the database version ( [databaseversion] )

dnn->iis->ntfs permissions?

new install - database connection error

where is web.config file in v. 3.1 ?

new to dnn, am getting sql errors

dnn + dundas charts + msft report rervices

can not edit any modules!

create input forms ?

install problem (attribute validaterequest unrecognized)

problems upgrading dotnetnuke

set host banners as default for all sites

newbie gets "cannot connect to db"

error on default page of dnn and module installation with script

where is the web.config file for a fresh 3.1

isa server 2004 & dnn 3.1.0 publishing

how to set up dnn on a remote shared server?

database connection not working

  Privacy | Contact Us
All Times Are GMT