<asp:ImageButton AccessKey="string" AlternateText="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" DescriptionUrl="uri" Enabled="True|False" EnableTheming="True|False" EnableViewState="True|False" ForeColor="color name|#dddddd" Height="size" ID="string" ImageAlign="NotSet|Left|Right|Baseline|Top|Middle|Bottom| AbsBottom|AbsMiddle|TextTop" ImageUrl="uri" 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" ToolTip="string" ValidationGroup="string" Visible="True|False" Width="size" > </asp:ImageButton>
<%@ Page Language="C#" Debug="true" %> <script runat="server"> void Page_Load(object sender, EventArgs e) { this.ImageButton1.ImageUrl = "images.gif"; this.ImageButton1.ToolTip = "Submit"; } void ImageButton1_Click(object sender, ImageClickEventArgs e) { this.lblText1.Text = this.txtTextBox1.Text; } </script> <html> <head> </head> <body> <form runat="server"> <asp:TextBox id="txtTextBox1" runat="server"></asp:TextBox> <asp:ImageButton id="ImageButton1" onclick="ImageButton1_Click" runat="server"></asp:ImageButton> <hr /> <asp:Label id="lblText1" runat="server"></asp:Label> </form> </body> </html>
ช่วยกันสนับสนุนรักษาเว็บไซต์ความรู้แห่งนี้ไว้ด้วยการสนับสนุน Source Code 2.0 ของทีมงานไทยครีเอท