<asp:LinkButton AccessKey="string" BackColor="color name|#dddddd" BorderColor="color name|#dddddd" BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|Groove|Ridge| Inset|Outset" BorderWidth="size" CausesValidation="True|False" CommandArgument="string" CommandName="string" 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" OnClick="Click event handler" OnClientClick="string" OnCommand="Command event handler" OnDataBinding="DataBinding event handler" OnDisposed="Disposed event handler" OnInit="Init event handler" OnLoad="Load event handler" OnPreRender="PreRender event handler" OnUnload="Unload event handler" PostBackUrl="uri" runat="server" SkinID="string" Style="string" TabIndex="integer" Text="string" ToolTip="string" ValidationGroup="string" Visible="True|False" Width="size" > </asp:LinkButton>
<%@ Page Language="VB" %> <script runat="server"> Sub LinkButton1_Click(sender As Object, e As EventArgs) Me.lblText1.Text = Me.TextBox1.Text Me.lblText2.Text = Me.TextBox2.Text End Sub Sub LinkButton2_Click(sender As Object, e As EventArgs) Handles LinkButton2.Click Me.lblText1.Text = Now & " - " &Me.TextBox1.Text Me.lblText2.Text = Now & " - " &Me.TextBox2.Text End Sub </script> <html> <head> </head> <body> <form runat="server"> <asp:TextBox id="TextBox1" runat="server"></asp:TextBox> <br /> <asp:TextBox id="TextBox2" runat="server"></asp:TextBox> <asp:LinkButton id="LinkButton1" onclick="LinkButton1_Click" runat="server">Submit 1</asp:LinkButton> <asp:LinkButton id="LinkButton2" runat="server">Submit 2</asp:LinkButton> <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 ของทีมงานไทยครีเอท