Click here to Skip to main content
15,920,633 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to use image button to open the url in another window. Currently it is opening in the new tab. I have tried the following options:

option1:
ASP.NET
<asp:ImageButton ID="Img12" runat="server" ImageUrl="IMG/ico_16_4212.gif" onclientclick= "window.open('http://devntdcrmweb1.dev.wellmark.com/SalesMarketing/main.aspx?etc=4212&extraqs=%3fetc%3d4212%26pagemode%3diframe%26preloadcache%3d1368193680992&pagetype=entityrecord','_blank');" />


option2:page load event:
HTML
this.form1.Target = "_blank";


Image button click:
C#
Response.Redirect("http://devntdcrmweb1.dev.wellmark.com/SalesMarketing/main.aspx?etc=4212&extraqs=%3fetc%3d4212%26pagemode%3diframe%26preloadcache%3d1368193680992&pagetype=entityrecord");
Posted
v2
Comments
ZurdoDev 10-May-13 10:59am    
What's the question?

1 solution

So you are looking for pop up window

Use the following code , set these parameters location=0,status=0,resizable=no,scrollbars=0,left=200,top=128, width=400px,height=200px , as per your requirement.

ASP.NET
<asp:imagebutton id="Img12" runat="server" imageurl="IMG/ico_16_4212.gif" xmlns:asp="#unknown">
            onclientclick="javascript:window.open('http://devntdcrmweb1.dev.wellmark.com/SalesMarketing/main.aspx?etc=4212&extraqs=%3fetc%3d4212%26pagemode%3diframe%26preloadcache%3d1368193680992&pagetype=entityrecord','mywindow','location=0,status=0,resizable=no,scrollbars=0,left=200,top=128, width=400px,height=200px');" /></asp:imagebutton>
 
Share this answer
 
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