How to open a url in a new browser window in Ajax page
-
Hi, I am working on a Asp.net project. Here we need to display a URL in a new browser window with custom size like a popup. For this I tried with below code: Page.RegisterStartupScript("New Window", "<script language=JavaScript>window.open('Default.aspx','mywindow','width=500,height=300');</script>"); This is working in all the my project pages. But this is not working in one of my project page where I used Ajax extenders like calender extender, Auto complete extender etc. So I also tried with ClientScript.RegisterClientScript() but eventhen it is not working. If anyone have any idea to solve this please reply me. Thanks in advance.
-
Hi, I am working on a Asp.net project. Here we need to display a URL in a new browser window with custom size like a popup. For this I tried with below code: Page.RegisterStartupScript("New Window", "<script language=JavaScript>window.open('Default.aspx','mywindow','width=500,height=300');</script>"); This is working in all the my project pages. But this is not working in one of my project page where I used Ajax extenders like calender extender, Auto complete extender etc. So I also tried with ClientScript.RegisterClientScript() but eventhen it is not working. If anyone have any idea to solve this please reply me. Thanks in advance.
Can you please tell us what error you are getting? If no error, then have you checked what it appears in View-Source in Browser? Also check if popup is blocked in your browser for that site.
Anurag Gandhi. http://www.gandhisoft.com Life is a computer program and every one is the programmer of his own life.
-
Hi, I am working on a Asp.net project. Here we need to display a URL in a new browser window with custom size like a popup. For this I tried with below code: Page.RegisterStartupScript("New Window", "<script language=JavaScript>window.open('Default.aspx','mywindow','width=500,height=300');</script>"); This is working in all the my project pages. But this is not working in one of my project page where I used Ajax extenders like calender extender, Auto complete extender etc. So I also tried with ClientScript.RegisterClientScript() but eventhen it is not working. If anyone have any idea to solve this please reply me. Thanks in advance.
Instead of
ClientScript.RegisterClientScript()
useScriptManager.RegisterStartupScript()
when the call is insideUpdatePanel
. ;)Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.
My Latest Articles-->** Simplify Code Using NDepend
Basics of Bing Search API using .NET
Microsoft Bing MAP using Javascript