Click here to Skip to main content
15,897,334 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
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
C#
        RectangleHS.NavigateUrl = "image.aspx?" + dr[4].ToString();
    }
}

i tried with javascript window.open method but its not working correctly...
Posted
Updated 11-Oct-12 23:03pm
v2

1 solution

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


Hope this will help you I have tried its working ............
 
Share this answer
 
Comments
Gopal Rakhal 13-Oct-12 1:21am    
thanks its working, but when new window opened the main window become blank, its only shows "[object]" in the top of page, m not able to make it work properly...

its showing this error only in IE but its working in chrome

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900