<asp:TextBox AccessKey="string" AutoCompleteType="None|Disabled|Cellular|Company|Department| DisplayName|Email|FirstName|Gender|HomeCity|HomeCountryRegion| HomeFax|HomePhone|HomeState|HomeStreetAddress|HomeZipCode| Homepage|JobTitle|LastName|MiddleName|Notes|Office|Pager| BusinessCity|BusinessCountryRegion|BusinessFax|BusinessPhone| BusinessState|BusinessStreetAddress|BusinessUrl| BusinessZipCode|Search" AutoPostBack="True|False" BackColor="color name|#dddddd" BorderColor="color name|#dddddd" BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|Groove|Ridge| Inset|Outset" BorderWidth="size" CausesValidation="True|False" Columns="integer" CssClass="string" Enabled="True|False" EnableTheming="True|False" EnableViewState="True|False" Font-Bold="True|False" Font-Italic="True|False" Font-Names="string" Font-Overline="True|False" Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small|Medium| Large|X-Large|XX-Large" Font-Strikeout="True|False" Font-Underline="True|False" ForeColor="color name|#dddddd" Height="size" ID="string" MaxLength="integer" OnDataBinding="DataBinding event handler" OnDisposed="Disposed event handler" OnInit="Init event handler" OnLoad="Load event handler" OnPreRender="PreRender event handler" OnTextChanged="TextChanged event handler" OnUnload="Unload event handler" ReadOnly="True|False" Rows="integer" runat="server" SkinID="string" Style="string" TabIndex="integer" Text="string" TextMode="SingleLine|MultiLine|Password" ToolTip="string" ValidationGroup="string" Visible="True|False" Width="size" Wrap="True|False" > </asp:TextBox>
<%@ Page Language="C#" Debug="true" %> <script runat="server"> void btnButton1_Click(object sender, EventArgs e) { this.lblText1.Text = this.TextBox1.Text; } void TextBox2_TextChanged(object sender, EventArgs e) { this.lblText2.Text = this.TextBox2.Text; } </script> <html> <head> </head> <body> <form runat="server"> <asp:TextBox id="TextBox1" runat="server"></asp:TextBox> <br /> <asp:TextBox id="TextBox2" runat="server" OnTextChanged="TextBox2_TextChanged" AutoPostBack="true"></asp:TextBox> <asp:Button id="btnButton1" onclick="btnButton1_Click" runat="server" Text="Button"></asp:Button> <hr /> <asp:Label id="lblText1" runat="server"></asp:Label><br> <asp:Label id="lblText2" runat="server"></asp:Label> </form> </body> </html>
ช่วยกันสนับสนุนรักษาเว็บไซต์ความรู้แห่งนี้ไว้ด้วยการสนับสนุน Source Code 2.0 ของทีมงานไทยครีเอท