图像地图热点上的弹出窗口,请单击 [英] Popup window on image map hotspot click

查看:63
本文介绍了图像地图热点上的弹出窗口,请单击的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

private void createhotspots(Label lb)
   {
       SqlConnection objcon = new SqlConnection(strCon);
       objcon.Open();
       string strQuery = "select * from PapersInfo where PageNo='"+lb.Text +"' and PaperDate='"+DropDownList1 .SelectedItem .Text +"'";
       SqlCommand cmd = new SqlCommand(strQuery, objcon);
       SqlDataReader dr = cmd.ExecuteReader();
       string strne = string.Empty;

       while (dr.Read())
       {
           int top = Convert.ToInt32(dr[5].ToString());
           int bottom = Convert.ToInt32(dr[6].ToString());
           int left = Convert.ToInt32(dr[7].ToString());
           int right = Convert.ToInt32(dr[8].ToString());
           RectangleHotSpot RectangleHS = new RectangleHotSpot();
           strne = dr[4].ToString();
           RectangleHS.Top = top;
           RectangleHS.Left = left;
           RectangleHS.Right = right;
           RectangleHS.Bottom = bottom;
           RectangleHS.AlternateText = "Click to View";
           ImageMap1.HotSpots.Add(RectangleHS);


在下面的行中,我需要打开弹出窗口以显示大图


in below line i need to open popup window to show larger image

        RectangleHS.NavigateUrl = "image.aspx?" + dr[4].ToString();
    }
}


我尝试使用javascript window.open方法,但无法正常使用...


i tried with javascript window.open method but its not working correctly...

推荐答案

RectangleHS.NavigateUrl ="javascript:window.open('WebForm1.aspx','Graph','height=600,width=900');"



希望这会对您有所帮助,我已经尝试过了.........



Hope this will help you I have tried its working ............


这篇关于图像地图热点上的弹出窗口,请单击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆