Author: hsobhy | Posted on: 4/5/2009 11:33:57 PM | Views : 459

Hi Guys,

I have a runat server HtmlSelect which generate categories names and values. As you know the rendered Name and ID always contain the Inherited Name from Control as follow:
<select name="ControlName:MySelect" id="ControlName_MySelect" onchange="myfunction(....);" >
 For some reason I need to have my custom name which doesn't look like the above formula (ControlName:MySelect) .. a name without the colon to be used in a piece of javascript code.

I tried the add attribute but it didn't work (duplicate name attributes).
MySelect.Attributes.Add("Name", "lstCategories")Is there any other way to do this?
Thank you in advance

 
...

Go to the complete details ...