C#
protected void Button1_Click(object sender, EventArgs e)
{
string queryString =
"http://localhost:39208/TreeView.aspx?param1="
+ TextBox1.Text.Trim();
string newWin =
"window.open('" + queryString + "');";
ClientScript.RegisterStartupScript
(this.GetType(), "pop", newWin, true);
}
VB.NET
Protected Sub Button1_Click(ByVal sender As Object, _
ByVal e As EventArgs)
Dim queryString As String = _
"http://localhost:39208/TreeView.aspx?param1=" & _
TextBox1.Text.Trim()
Dim newWin As String = _
"window.open('" & queryString & "');"
ClientScript.RegisterStartupScript(Me.GetType(), _
"pop", newWin, True)
End Sub
Tweet
11 comments:
Simple, yet saved me a lot of time. Thank you very much!
Problem is this is blocked by a pop up blocker
its work fine but problem is that click on button page is refreshed.
thanks , i was looking for the solution
thanks
ya..i got it. thanks for ur solution.
thank you for the code, saved alot of time.. :)
Nice! Saved lot of time
thank you for the idea!! like it and solved my problem :)
when click a button two windows will be open
what is that textbox1 means in the code
its ID of textbox @Dinesh.P
Post a Comment