473,396 Members | 1,772 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Add QueryString to Every Page?

I generate a querystring on page #1 and want that querystring to stay
on every other page the user chooses, regardless of session or
postback issues. What is a good way to handle that?

Thanks.
Nov 18 '05 #1
3 2489
bdwise,

..Net keeps the query string on every page during post backs for you. So all
you'll have to do is add the query string on to any links on your page and
also tack it on to any Response.Redirects and you're done.

Just add it on as: "mypage.aspx?" & Request.Querystring.ToString

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
"bdwise" <br************@hotmail.com> wrote in message
news:59**************************@posting.google.c om...
I generate a querystring on page #1 and want that querystring to stay
on every other page the user chooses, regardless of session or
postback issues. What is a good way to handle that?

Thanks.

Nov 18 '05 #2
But what if I do a Response.Redirect or Server.Transfer from a
codebehind? The querystring would get lost.


.Net keeps the query string on every page during post backs for you. So all
you'll have to do is add the query string on to any links on your page and
also tack it on to any Response.Redirects and you're done.

Just add it on as: "mypage.aspx?" & Request.Querystring.ToString

Nov 18 '05 #3
bdwise,

If you do one of those you'll have to add it on.

Like this:

Response.Redirect("pagetwo.aspx?" & Request.Querystring)

Which would pass the entire query string, from whatever page you are
transferring from, to page two.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
"bdwise" <br************@hotmail.com> wrote in message
news:59**************************@posting.google.c om...
But what if I do a Response.Redirect or Server.Transfer from a
codebehind? The querystring would get lost.


.Net keeps the query string on every page during post backs for you. So all you'll have to do is add the query string on to any links on your page and also tack it on to any Response.Redirects and you're done.

Just add it on as: "mypage.aspx?" & Request.Querystring.ToString

Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Robb Meade | last post by:
Hi all, A recent project that I had finished and went live with no apparant problems. My client received an email from a user who mentioned that by accident they had been typing (over the...
1
by: Deepiceman | last post by:
Hi all, I am new to asp so bear with me. I want to write a page which will load a default page for me with some links and all. lets say someone clicks on the link, which not only points to the...
0
by: Matt Howeson | last post by:
Some time ago I posted a request for help with a problem I was having sometime ago whereby a 404 error would result if any access to the Querystring had been made before the Context.Rewritepath is...
4
by: Raterus | last post by:
Howdy, Simple question, but I can't figure out how to do it. I have a a page which is called initially with a querystring. After I get the querystring values, I don't need the querystring to...
3
by: Dan Sikorsky | last post by:
How can I get the Querystring passed to the Referring Page from its referrer? I don't want the querystring coming to my current page. I want the querystring that came to the referring page, so...
6
by: Paul | last post by:
Here is a question that should get everyone going. I have an ecommerce site where I need to pass the order_id to every page. So which method is the best practice to pass this variable between...
6
by: Joe | last post by:
Hello All: I have a webform (WebForm1.aspx) that retrieves a value from a database (_formSessionId) the first time that it is posted. After the user filles in the form, he/she clicks a Button...
1
by: beebee | last post by:
Hi all. I am having a bit of difficulty: Here is what is happening: I have an application that spits out a thankyou.aspx page and i would like to pass it the querystring values it had collected...
4
by: .nLL | last post by:
Hi, im am a classic asp developer and started to learn asp.net but got stuck with a simple problem even before i step in to further. to learn i have started from a simple project (a login system...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.