• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 295
  • Last Modified:

Open A Html Page in New Window using javascript with Asp.Net

Hi all,
I am New To Asp
In Asp.Net i have a button btnShow. And I also have few option button of same group name. I want to know that

' if i checked any one of the option button and then click btnShow, then that must lead me to open a new blank page and it should load a .html file '

Advance Thanx
Nalinkumarbalaji.Shanmugam
0
Nalinkumarbalaji
Asked:
Nalinkumarbalaji
2 Solutions
 
ZylochCommented:
Hi Nalinkumarbalaji,

Can you put this inside the button? onclick="window.open('yourhtml.html','myWin','width=200,height=200');"

Regards,
Zyloch
0
 
muellerfanCommented:
If your button does not have "runat=server" in it, then the above will work.  Otherwise, in your code behind, you will need to add the following to the page_load function:

btnShow.Attributes.Add("onclick","window.open('yourhtml.html','myWin','width=200,height=200');return false;");
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now