HighTechTalks DotNet Forums  

Re: WebControl - Child control events

ASP.net Building Controls microsoft.public.dotnet.framework.aspnet.buildingcontrols


Discuss Re: WebControl - Child control events in the ASP.net Building Controls forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Gaurav Vaish \(MasterGaurav\)
 
Posts: n/a

Default Re: WebControl - Child control events - 01-14-2007 , 05:23 AM






Have you added the button to the 'Controls' property of the custom-web
control?
How are you rendering the button?

Well, "runat" attribute is not to be sent to the client... it is processed
by ASP.Net Runtime. I think you need better understanding of HTML and
ASP.Net first.

anyway... some code that you wrote should be able to help you out in
resolving the problem..


--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujini-labs.com
http://eduzine.edujinionline.com
-----------------------------------------


"Simon" <Simon (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hey guys.

I am learning how to write a custom web control and I am inheriting from
System.Web.UI.WebControls.WebControl. I have created an instance of a
Button
class inside of this control and in the constructor of the control I have
handled the Click event. When I click the button and it submits the page,
the
event doesn't fire.

I want to be able to handle that click event and fire the parent controls
click event so the developer using the control can handle appropriately.

I am not sure what is stopping the event from firing. The function that
receives the event isn't being executed. I then thought oh yeah I forgot
to
.Attributes.Add("runat", "server"); but that didn't make a difference.

Any help would be greatly appreciated.

Thanks and take care.



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.