Alex Rivera | Logout

asp.net UserControl properties

Asked 2012-01-22T12:40:16.170
12

Is it possible to access properties not defined in user control? I want to add any html attribute without defining it in codebehind.

ex:

<my:TextBox runat="server" extraproperty="extravalue" />

where extraporperty not defined in user control, but still generates:

<input type="text" extraproperty="extravalue" />

I need this in custom user control. Notice the my: before the textbox.

ty!

Edit
Report

1 Answer

2

you should be able to add attributes to the controls Attributes collection.

answered 2012-01-22T12:46:50.650

Your Answer