Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.
Damit Ich habe ein Web User Control bei dem ich eine TextBox als Property nach außen geben möchte, damit man die Eigenschaften der Textbox editieren kann. Das kann man durch ein paar Attribute erreichen.
[Browsable(true), NotifyParentProperty(true), PersistenceMode(PersistenceMode.InnerProperty), DesignerSerializationVisibility(DesignerSerializationVisibility.Content), RefreshProperties(RefreshProperties.Repaint)] public TextBox DropDownTextbox { get { return this.TextBox1; } set { this.TextBox1 = value; } }
<uc1:WebUserControl1 ID="WebUserControl11" runat="server" DropDownTextBox-BackColor="#FFCC00"> <DropDownTextbox BackColor="red"></DropDownTextbox> </uc1:WebUserControl1>
Remember Me