Wednesday 8 October 2014

How to Use ImageButton in Asp.Net C#

No comments    
categories: , ,
IMAGEBUTTON




Html Code

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>   
       
        <asp:ImageButton ID="ImageButton1" runat="server"
            Height="139px" ImageUrl="~/tiger.jpg"
            OnClick="ImageButton1_Click1" Width="493px" />
     
    </div>
    </form>
</body>
</html>

C# Coding

 protected void ImageButton1_Click1(object sender, ImageClickEventArgs e)
    {
        Response.Write("<script>alert('This is a Tiger')</script>");

    }






                                 




                         

                             

0 comments:

Post a Comment