|
|
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
'Like' us on our FaceBook page if you find this blog useful. Thanks!
Did you like this post?
|
|
|
||
|
|
|
|
Save on Delicious |
|
|
subscribe via rss |
|
subscribe via e-mail |
|
|
print this post |
|
follow me on twitter |




comments
7 Responses to "Open a PopUp Window on the ASP.NET Button Click event and pass Parameters"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
Post a Comment