Ask a Question related to ASP.NET Building Controls, Design and Development.
-
Gaurav Vaish \(MasterGaurav\) #1
Re: WebControl - Child control events
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 | [url]www.mastergaurav.com[/url]
[url]www.edujini-labs.com[/url]
[url]http://eduzine.edujinionline.com[/url]
-----------------------------------------
"Simon" <Simon@discussions.microsoft.com> wrote in message
news:045F3E90-22BA-4746-9C84-F47569F87CA7@microsoft.com...> 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.
Gaurav Vaish \(MasterGaurav\) Guest
-
Why don't child control events trigger OnBubbleEvent?
I have a control which contains a collection of another control. The members of the collection can contain child controls themselves, but these... -
Notify child control of events in parent control
I have a parent control that has a imagebutton on it, with code to handle the click event. I also have various ascx controls that are loaded by the... -
Composite WebControl -- Child Control Property Persistance at Design-time
Hi, I seen, this asked a number of times at this group but still have not seen any complete/rectified/fixed code. I have created a Composite... -
No events are fired in child control
I have developed a custom web control that may contain any child controls. Now I have a problem that even though I register an event handler on a... -
HELP!! Datagrid Child Control Events
Hi All Does anyone have an idea on how to do the following? In the editmode template of a datagrid control I have 2 dropdownlist controls ...



Reply With Quote

