Ask a Question related to ASP.NET General, Design and Development.
-
Marc Hoeppner #1
Re: Control ID within UserControl
Hi,
the way I do it is to use ClientID to change the JScript in the ASPX. I know
this is a little painful, but ASP.NET needs to change the ID in order by
able to use the control inside of other user controls for example.
So, instead of writing
if( MyControlID != null )
alert( MyControlID.Name )
you'd have to do
if( <%=thisControl.ClientID%> != null )
alert( <%=thisControl.ClientID%>.Name )
Then you need to do a DataBind on PageLoad for the page (Page.DataBind()).
Best regards,
Marc Höppner
NeoGeo
"Fernando Arámburu" <fernara@sol.info.unlp.edu.ar> wrote in message
news:uHVnGnUUDHA.2180@TK2MSFTNGP12.phx.gbl...>
> Hi All,
> Is there any way for a Control within a UserControl to preserve the
> original ID once render is called?
> I´ve tried ClientID property but it doesnt work. I need to preserve the
> original one cause there´s some javascript code using it.
> Thank you
>
> Fer
>
> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
> Don't just participate in USENET...get rewarded for it!
Marc Hoeppner Guest
-
Can we use a usercontrol inside a usercontrol
hi group can we use a usercontrol inside a usercontrol. i mean can we use <%Register tagprefix..... src=....ascx%> in an ascx file. thanks in... -
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... -
UserControl not capturing Button click event when loaded with PlaceHolder Control
My UI is one table, 2 colums, one row. The cell on the left has a tree and the cell on the right has a placeholder control. When the user clicks on... -
WebBrowser Control won't run in a UserControl
Hi Paul, I had replied this issue in windowsforms.controls group. You may try my test steps,if you have any questions on this issue, please feel... -
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...



Reply With Quote

