Ask a Question related to ASP.NET Building Controls, Design and Development.
-
John Giblin #1
Re: onserverclick in a usercontrol inside of a webcontrol
More Info:
In my webcontrol I am implementing the IPostBackEventHandler. I print out
the eventArgument and I do not get anything from the usercontrol inside but
does print out the arg from the webcontrol.
I also tried implementing this in the usercontrol and does not reach the
IPostBackEventHandler.RaisePostBackEvent.
Inside RenderContents:
UserControl usercontrol
=(UserControl)Page.LoadControl("~/usercontrols/common/Event_Add.ascx" );
this.Controls.Add(usercontrol);
"John Giblin" <jwgiblin3@hotmail.com> wrote in message
news:eosIQHQXDHA.2312@TK2MSFTNGP10.phx.gbl...the> I have a webcontrol that dynamically adds a usercontrol. This usercontrol
> has a form to enter data. The form tags are outside the webcontrol and> links work like expected for the webcontrol. but the user control never
> goes to the onserverclick event. Do I have to tell the event target or
> something? and how do I do this.
>
> John
>
>
John Giblin Guest
-
Event not firing in usercontrol inside usercontrol
I'm stumped on this problem. I've created a user control that dynamically creates 5 linkbuttons in the CreateChildControls method. Each of these... -
WebControl inside of WebControl and attaching events
I have built a navigation custom web control that I have been placing on various pages without issue. When one of the image buttons within the... -
Adding a usercontrol to a WebControl
I am trying to add a usercontrol to my webcontrol and I seem to be stuck. I see the method add in the control, but I cannot add the user control... -
Problem with WebControl and dynamic UserControl..
I am trying to make a WebControl as a content panel which given the user control name and location, will create the specified user control to fill... -
Use LoadControl to load a usercontrol but the webcontrol in the usercontrol can not AutoPostBack
a uscontrol test.ascx have a dropdownlist web control the dropdownlist's AutoPostBack property is set "true" but when i use... -
John Saunders #2
Re: onserverclick in a usercontrol inside of a webcontrol
John,
You are adding that user control _much_ too late for it to get events. By
the time you get to Render, everything's been decided. If you implement
CreateUserControls, you should do it there, otherwise try moving that code
up to OnLoad.
--
John Saunders
Internet Engineer
[email]john.saunders@surfcontrol.com[/email]
"John Giblin" <jwgiblin3@hotmail.com> wrote in message
news:%23oPY$ISXDHA.3232@tk2msftngp13.phx.gbl...but> More Info:
> In my webcontrol I am implementing the IPostBackEventHandler. I print out
> the eventArgument and I do not get anything from the usercontrol insideusercontrol> does print out the arg from the webcontrol.
> I also tried implementing this in the usercontrol and does not reach the
> IPostBackEventHandler.RaisePostBackEvent.
>
> Inside RenderContents:
> UserControl usercontrol
> =(UserControl)Page.LoadControl("~/usercontrols/common/Event_Add.ascx" );
> this.Controls.Add(usercontrol);
>
>
> "John Giblin" <jwgiblin3@hotmail.com> wrote in message
> news:eosIQHQXDHA.2312@TK2MSFTNGP10.phx.gbl...> > I have a webcontrol that dynamically adds a usercontrol. This> the> > has a form to enter data. The form tags are outside the webcontrol and>> > links work like expected for the webcontrol. but the user control never
> > goes to the onserverclick event. Do I have to tell the event target or
> > something? and how do I do this.
> >
> > John
> >
> >
>
John Saunders Guest
-
John Saunders #3
Re: onserverclick in a usercontrol inside of a webcontrol
Well, I don't know what the problem is, but by the time of RenderControl,
the party's over and there's little left but the cleaning up!
I suggest you try again, changing nothing but the location where you load
the control and add it. In particular, watch to see if its in the postback
list, and check to see if the name of the button is in the form data being
posted back.
--
John Saunders
Internet Engineer
[email]john.saunders@surfcontrol.com[/email]
"John Giblin" <jwgiblin3@hotmail.com> wrote in message
news:ufm4quSXDHA.2344@TK2MSFTNGP09.phx.gbl...> I have tried to to add the control in the CreateChildControls of the web
> control. I still does not fire the serverClick event. Furthermore I do
> not get the savestate of the control
>
> John
>
> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
> Don't just participate in USENET...get rewarded for it!
John Saunders Guest



Reply With Quote

