是否可以訪問未在用戶控件中定義的屬性?我想添加任何html屬性,而不用在代碼隱藏中定義它。asp.net UserControl屬性
例如:
<my:TextBox runat="server" extraproperty="extravalue" />
凡在用戶控件沒有定義extraporperty,但仍然會產生:
<input type="text" extraproperty="extravalue" />
我需要這在自定義用戶控件。注意我的:在文本框之前。
ty!
你的.ascx看起來像什麼? –