Click here to Skip to main content
15,885,141 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
you can see my image using this link : http://tinypic.com/view.php?pic=2dkwxhs&s=5#.Us4u1vQW0Xt
hello,

while clicking i showing image and parts number 1,2,3 and so forth. you can see that image as saving the above image. everything works fine. but if i click one part number , i have to close that pop up window to click next part number. but i need when you click next part number the preveous(which is poped up) should close and recently clicked part window should open.

here i put coding.

I, aspx.cs page:
C#
Datatable dt = (DataTable)Session["parts"];
  
 CircleHotSpot h = new CircleHotSpot();
 h.X = Convert.ToInt32(dt.Rows[i]["xpos"]);
 h.Y = Convert.ToInt32(dt.Rows[i]["ypos"]);
 h.X = convertxypos(h.X);
 h.Y = convertxypos(h.Y);
  
 h.Radius = 10;
  
 h.NavigateUrl="javascript:funname("+dt.Rows.[i]["partnumber"].ToString()+")";

II, aspx page.

ASP.NET
<script type="txt/Javascript">
  
 function funname(partno){
  
 document.getElementById('<%=lblf12.ClientID%>').innerHTML = partno;
  
 var mod = $find("mypartid"); // this part number 1,2,3,...comes
 if (mod != null) {
 document.getElementById('<%=Pan1.ClientID%>').style.visibility = "visible";
 mod.set_X(gx + 5);
 mod.set_Y(gy);
 mod.show();
  
 }
  
 }
  
 </script>
  
 <ajaxtoolkit:ModalPopupExtender ID="Modpop1" BehaviorID="mypartid"  runat="server"
 TargetControlID="imcl" PopupControlID="Pan1" CacheDynamicResults="true" // imcl is the id of image close button 'X'
 DropShadow="true" CancelControlID="imcl">
 </ajaxtoolkit:ModalPopupExtender>
  
 <ajaxtoolkit:RoundedCornersExtender Corners="All" Radius="6"  runat="server" ID="pop_round" TargetControlID="Pan1" ></ajaxtoolkit:RoundedCornersExtender>
  
 <asp:Panel ID="Pan1" Width="300" runat="server" >
  
 <table style=" width:100%; height:47px; color: #FFFFFF;">
  
 <tr><td>
  
 <asp:ImageButton ID="imcl" runat="server" ImageUrl="~/Im/clo1.gif" Width="28" Height="25" /> //this close image 'X' which is showing in image.
  
 </td></tr></table>
  
 <table><tr>
 <td><asp:Label ID="labf1" runat="server" Text="part number" Font-Names="Sans-Serif" Font-Size="12px"></asp:Label>      :
 <asp:Label ID="lblf12" runat="server" Font-Names="Sans-Serif" Font-Size="12px" "></asp:Label></td></tr></table>
  
 </asp:Panel>


Help needed.
Posted
Updated 8-Jan-14 18:20pm
v2

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