|
Subject:
|
From a Querystring to a QueryString
|
|
Posted By:
|
matt.fields
|
Post Date:
|
11/26/2003 11:37:47 AM
|
I am trying to use the below code to use the current querystring on a page and pass the string to another page. I am also using JavaScript to open the window in a pop-up format. The problem I am having is that the page will not display the Querystring, it just displays Admin_dist_sales_add.aspx?distid=
Does anyone have any ideas?
Private Sub BtnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Response.Redirect("Javascript:window.open(Admin_dist_sales_add.aspx?distid=" & Request.QueryString("distid") & ",null,'toolbar=no,location=no,status=no,menubar=no,scrollbar=no,resizable=Yes,width=400,height=510") End Sub
|
|
Reply By:
|
planoie
|
Reply Date:
|
11/26/2003 11:49:46 AM
|
First off, I think you should get rid of this whole handler. If all you want to do with BtnAdd is open and new window, just use a regular old HTML button and write what you have in the Redirect into the onClick client side handler of the button. I can't imagine redirecting to a javascript call would even work correctly.
Peter ------------------------------------------------------ Work smarter, not harder.
|
|
Reply By:
|
matt.fields
|
Reply Date:
|
11/26/2003 2:05:15 PM
|
I tried this with no luck.
<INPUT type="button" value="Button" onclick = window.open('Admin_dist_sales_add.aspx?distid=<%Request.Querystring("distid")%>',null,toolbar=yes,location=no,status=no,menubar=no,scrollbar=no,resizable=Yes,width=400,height=510') >
I get the following error.
BC30545: Property access must assign to the property or use its value.
quote: Originally posted by planoie
First off, I think you should get rid of this whole handler. If all you want to do with BtnAdd is open and new window, just use a regular old HTML button and write what you have in the Redirect into the onClick client side handler of the button. I can't imagine redirecting to a javascript call would even work correctly.
Peter ------------------------------------------------------ Work smarter, not harder.
|
|
Reply By:
|
jacob
|
Reply Date:
|
11/26/2003 2:28:17 PM
|
Here it is...<INPUT type="button" value="Button" onclick="window.open('Admin_dist_sales_add.aspx?distid=<% =Request.Querystring("distid") %>',null,'toolbar=yes,location=no,status=no,menubar=no,scrollbar=no,resizable=Yes,width=400,height=510');">This is tested.
Hope it helps.
Jacob.
|