<%@ Page Language="C
#" AutoEventWireup="true" CodeFile="ImageButton.aspx.cs" Inher
ITs="WebControls_ImageButton" %>
&nbs
p;
<!DOCTY
PE ht
ML P
ubLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
XMlns="
http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ImageButton ID="i
BTn" runat="server" H
eight="20px" ImageUrl="
http://images.cnblogs.com/cnblogs_com/ylbtech/403178/o_sanyecao.jpg"
ToolTip="前台指向" Width="118px" />
<
br />
<br />
<asp:ImageButton ID="ibtn2" runat="server" Height="20px" ImageUrl="
http://images.cnblogs.com/cnblogs_com/ylbtech/403178/o_sanyecao.jpg"
ToolTip="后台指向" Width="118px" onclick="ibtn2_Click" />
</div>
</form>
</body>
</html>
using
System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class WebControls_ImageButton : System.Web.UI.Page
{
PRotected void Page_Load(object sender, Event
args e)
{
}
protected void ibtn2_Click(object sender, ImageClickEventArgs e)
{
//方法内可以做很多操作
//注册,注册成功,跳转到主页
Response.
redirect("~/DemoHTML.aspx");
}
}