Ask a Question related to ASP.NET General, Design and Development.
-
huobazi #1
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 Loadcontrol("test.ascx") in a aspx fiel's Page_Load event the
dropdownlist which in the ascx can not run good it can not autopostback and
can not call the OnselectedChange event. help me pls~~
huobazi Guest
-
Howto load a usercontrol from App_Code
For the last ½ year i've been looking for a way to load my usercontrols at runtime from different pages using a standard. I know i can reference... -
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... -
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... -
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... -
David Waz... #2
Use LoadControl to load a usercontrol but the webcontrol in the usercontrol can not AutoPostBack
I assume you are using a dynamic control--
Be SURE the control exists when you post back to your page.
if the control doesn't exist when the page posts back, it
cannot receive the vent.
so, load the control regardless of the value
of "IsPostBack".
2ndly, do you add a handler when the control is first
rendered? you need to assign some routine to handle the
event:
AddHandler myControl.MyEvent Addressof MyEventHandler
unless you are using member-level "WithEvents" variable
for your control.
dropdownlist's>-----Original Message-----
>a uscontrol test.ascx have a dropdownlist web control thePage_Load event the>AutoPostBack property is set "true"
>but when i use Loadcontrol("test.ascx") in a aspx fiel'snot autopostback and>dropdownlist which in the ascx can not run good it can>can not call the OnselectedChange event. help me pls~~
>
>
>.
>David Waz... Guest



Reply With Quote

