110,499
社区成员
发帖
与我相关
我的任务
分享
//看了控件之后才发现控件这么多人用
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
protected void ImageMap1_Click(object sender,ImageMapEventArgs e)
{
Response.Write("dfds");
Response.Write(e.PostBackValue);
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Test-Controls-ImageMap</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ImageMap ID="ImageMap1" runat="server" ImageUrl="http://www.google.cn/intl/zh-CN/images/logo_cn.gif" Width="300px" OnClick="ImageMap1_Click" HotSpotMode="PostBack">
<asp:RectangleHotSpot Top="0" Bottom="225" Left="0" Right="150" AlternateText="Hello" PostBackValue="Hello" />
<asp:RectangleHotSpot Top="0" Bottom="225" Left="151" Right="300" AlternateText="World" PostBackValue="World" />
</asp:ImageMap>
</div>
</form>
</body>
</html>