473,503 Members | 2,157 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Query String

How can I save values in Query String Could u please give me example. I
don't want to save as using Response.redirec
Oct 3 '07 #1
4 2551
Bobby,
your post is unclear. Do you want an example of how to put values on a
querystring? Or do you want to retrieve the values on the querystring in the
target requested page? Request.QueryString is a NameValueCollection object in
ASP.NET.
Peter
--
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com

"bobby" wrote:
How can I save values in Query String Could u please give me example. I
don't want to save as using Response.redirec
Oct 3 '07 #2
On Oct 3, 10:33 pm, bobby <bo...@discussions.microsoft.comwrote:
How can I save values in Query String Could u please give me example. I
don't want to save as using Response.redirec
QueryString is read-only and you can't change it, because this is how
the page was queried from a browser. Please explain your problem in
more detail.

Oct 3 '07 #3

Actually I want to check weather my querystring is empty or not.
if (Request.QueryString["Token"] != null && Request.QueryString["Token"]
!= "")
But I want to put value in Querstring e.g in Token ="ABC" If I use this
Response.Redirect("Admin.aspx?Token=" + "ABC"); then before testing that if
it is null or not it is redirecting me to Admin.aspx page. I just want to
save that value in code behind and want to chect if it is null or not


"Peter Bromberg [C# MVP]" wrote:
Bobby,
your post is unclear. Do you want an example of how to put values on a
querystring? Or do you want to retrieve the values on the querystring in the
target requested page? Request.QueryString is a NameValueCollection object in
ASP.NET.
Peter
--
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com

"bobby" wrote:
How can I save values in Query String Could u please give me example. I
don't want to save as using Response.redirec
Oct 3 '07 #4
to add it to the current page, you redirect to the current page with the
token added. this will update the browsers url.

-- bruce (sqlwork.com)

bobby wrote:
Actually I want to check weather my querystring is empty or not.
if (Request.QueryString["Token"] != null && Request.QueryString["Token"]
!= "")
But I want to put value in Querstring e.g in Token ="ABC" If I use this
Response.Redirect("Admin.aspx?Token=" + "ABC"); then before testing that if
it is null or not it is redirecting me to Admin.aspx page. I just want to
save that value in code behind and want to chect if it is null or not


"Peter Bromberg [C# MVP]" wrote:
>Bobby,
your post is unclear. Do you want an example of how to put values on a
querystring? Or do you want to retrieve the values on the querystring in the
target requested page? Request.QueryString is a NameValueCollection object in
ASP.NET.
Peter
--
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com

"bobby" wrote:
>>How can I save values in Query String Could u please give me example. I
don't want to save as using Response.redirec
Oct 3 '07 #5

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

Similar topics

8
8199
by: Phil Powell | last post by:
if (document.location.href.indexOf('?') >= 0) document.location.href = document.location.href.substring(0, document.location.href.indexOf('?')); if (document.location.href.indexOf('#') >= 0) {...
3
7432
by: Dr. Oz | last post by:
Hi, I am trying to read in a query string from one page and build a link to another page based on the query string. Here's the code I am using to read in the query string: <script...
4
2847
by: Alan Lane | last post by:
Hello world: I'm including both code and examples of query output. I appologize if that makes this message longer than it should be. Anyway, I need to change the query below into a pivot table...
0
3484
by: starace | last post by:
I have designed a form that has 5 different list boxes where the selections within each are used as criteria in building a dynamic query. Some boxes are set for multiple selections but these list...
3
3283
by: MLH | last post by:
Am repeating question with different subject heading, perhaps stating more clearly my problem... I have an A97 query (qryVehiclesNowners2) that has a table field in it named . Depending on the...
4
3013
by: deko | last post by:
When using OutputTo with a query, the 'File name' window in the 'Output To' dialog gets populated with the name of the query by default. This makes the exported file self-describing if the query...
1
2689
by: Oliver Bleckmann | last post by:
Damn, what's wrong here? CGI cgi; map<string,stringcgiParam = cgi.analyseCgiParam(); cout << cgiParam << endl; cout << cgiParam << endl; /////////////////////// #include <iostream>
2
17627
by: =?Utf-8?B?Q2hyaXM=?= | last post by:
How can I run this query against a table in my Access database? I don't know hwo to use it in C#. In VB I would use .Recordset = "some sql statement". How do I do this in C#? //I get a vlaue...
1
1944
by: TF | last post by:
This group came through for me last time so here we go again. My page shows paint colors, brand name, product code, etc in a gridview with the background matching the paint color. Several links on...
3
2543
by: pbd22 | last post by:
Hi. I need some help with structuring my query strings. I have a form with a search bar and some links. Each link is a search type (such as "community"). The HREF for the link's anchor looks...
1
7008
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
7467
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
5594
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,...
0
4688
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3177
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3168
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1521
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
746
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
399
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.