ASP.NET 中ImageMap控件的用法(2)


using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
 
public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
    protected void ImageMap1_Click(object sender, ImageMapEventArgs e)
    {
        String region = "";
        switch (e.PostBackValue)
        {
            case "Pro1":
                region = "处理1";
                break;
            case "Pro2":
                region = "处理2";
                break;
        }
        LabMessage.Text = "您单击的是<b>" + region + "</b>.";
    }
}

您可能感兴趣的文章:

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wjwzgz.html