Hello, I have made a UserControl in ASP.net with the custom property ClientID.
My only question (and I feel like an idiot asking) is how to assin this property with a variable. At first I thought I could just do
<Control:UserControl ID=UC1 Client_ID=<%iClientID%> runat=server />
But you can't use the <% %> brackets inside a runat=server thinger.
Next I thought I could change the property with javascript. (Another stupid thought) by using a simple
document.getElementById('UC1').Client_ID = iClientID;
But of course that didn't work because javascript can't access that server stuff.
So I'm asking you guys now. How can I assign a variable to a UserControl Property?
Thanks,
ArchG
<!--EDIT--><span class=editedby><!--/EDIT-->[Edited by - ArchG on January 4, 2006 2:52:55 PM]<!--EDIT--></span><!--/EDIT-->