Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.1
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 26th, 2003, 12:37 PM
Authorized User
 
Join Date: Oct 2003
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default From a Querystring to a QueryString

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_di st_sales_add.aspx?distid=" & Request.QueryString("distid") & ",null,'toolbar=no,location=no,status=no,menubar=n o,scrollbar=no,resizable=Yes,width=400,height=510" )
End Sub

 
Old November 26th, 2003, 12:49 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

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.
 
Old November 26th, 2003, 03:05 PM
Authorized User
 
Join Date: Oct 2003
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I tried this with no luck.

<INPUT type="button" value="Button" onclick = window.open('Admin_dist_sales_add.aspx?distid=<%Re quest.Querystring("distid")%>',null,toolbar=yes,lo cation=no,status=no,menubar=no,scrollbar=no,resiza ble=Yes,width=400,height=510') >

I get the following error.

BC30545: Property access must assign to the property or use its value.


Quote:
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.
 
Old November 26th, 2003, 03:28 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 440
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here it is...
Code:
<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.





Similar Threads
Thread Thread Starter Forum Replies Last Post
using querystring melkin Classic ASP Basics 7 April 1st, 2008 09:07 AM
PHP Querystring kaustic Beginning PHP 1 November 2nd, 2007 01:42 AM
Querystring or not? myself Classic ASP Basics 4 July 4th, 2006 09:01 AM
request querystring dannyphw ASP.NET 1.0 and 1.1 Basics 1 October 25th, 2004 10:35 AM
Value in Querystring not being passed u_heet Classic ASP Professional 2 September 16th, 2004 07:15 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.