Mar 23, 2010, 9:01 AM
how to open new browser when i click button
Hi All,
I can try to open new browser when i click a button (In cs File).for that i can write
the following javascript function in button click event.but it is not working
in coolite button click event.but it will work in asp button click event..
why it will happen like this ...i want to open a new browser when i click button
(in coe behind) of coolite button..plz give me reply as soon as possible..
Thanks in Advance....
<U>In Asp button click...</U>
protected void Button1_Click(object sender, EventArgs e)
{
string script = "window.open('http://localhost:1389/test/Accounts/Default2.aspx');";
this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "OpenPage", script, true);
}
<U>In coolite Button Click...</U>
protected void btnEdit_Click(object sender, AjaxEventArgs e)
{
string script = "window.open('http:\\SignIn.aspx',target='_blank');";
this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "OpenPage", script, true);
}