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
Simple, yet saved me a lot of time. Thank you very much!
ReplyDeleteProblem is this is blocked by a pop up blocker
ReplyDeleteits work fine but problem is that click on button page is refreshed.
ReplyDeletethanks , i was looking for the solution
ReplyDeletethanks
ya..i got it. thanks for ur solution.
ReplyDeletethank you for the code, saved alot of time.. :)
ReplyDeleteNice! Saved lot of time
ReplyDeletethank you for the idea!! like it and solved my problem :)
ReplyDeletewhen click a button two windows will be open
ReplyDeletewhat is that textbox1 means in the code
ReplyDeleteits ID of textbox @Dinesh.P
ReplyDelete