Is there a way to control how .Net sets the Name and ID property of my controls? I have some radio buttons for which I need the name to be the same. However if I set the ID property of the radio button control it sets the Name and the ID. I see no way to treat the ID and Name separately. So now all button’s ids are the same as well.
If you are thinking that I should be using a RadioButtonList to achieve this you may be right, but I have not found a way to include table structure in a dynamically created RadioButtonList.
Thanks
Yes.
Declare a descendant class from, say, a textbox, which overrides the UniqueID and ClientID properties. Then, use (in this example) MyControls.Textbox instead of the built-in textbox.
Note that you’ll need to register your controls in web.config:
Then you can reference them in your markup: