473,409 Members | 1,942 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,409 software developers and data experts.

append to query string

Hi,
I have an asp.net page that has a save method. I would like to append
to the querystring at the end of the save method, before the page reloads.
Is there a way to do this without using Server.Transfer?
Thanks

Sean
Jan 26 '06 #1
4 9148
You don't have to use the querystring to pass values back to the page. You
can use the HttpContext Items collection, hidden form fields, Session, Cache,
or even ViewState.
Aside from that, I can't think of any other way besides Response.Redirect.

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"netnet" wrote:
Hi,
I have an asp.net page that has a save method. I would like to append
to the querystring at the end of the save method, before the page reloads.
Is there a way to do this without using Server.Transfer?
Thanks

Sean

Jan 26 '06 #2
Thank you Peter, I was looking for something that would actually place a
value in the querystring, not hide it in the form, or server memory. I
wanted to use the query string so that a user would have something to
bookmark, sorry I didnt make my objective more clear in my inital post. I
thought since the QueryString was simply a collection there would be a way
to .Add() to that collection.
Sean
"Peter Bromberg [C# MVP]" <pb*******@yahoo.nospammin.com> wrote in message
news:D4**********************************@microsof t.com...
You don't have to use the querystring to pass values back to the page. You
can use the HttpContext Items collection, hidden form fields, Session,
Cache,
or even ViewState.
Aside from that, I can't think of any other way besides Response.Redirect.

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"netnet" wrote:
Hi,
I have an asp.net page that has a save method. I would like to
append
to the querystring at the end of the save method, before the page
reloads.
Is there a way to do this without using Server.Transfer?
Thanks

Sean

Jan 26 '06 #3
Hello netnet,
Thank you Peter, I was looking for something that would actually place
a value in the querystring, not hide it in the form, or server memory.
I wanted to use the query string so that a user would have something
to bookmark, sorry I didnt make my objective more clear in my inital
post. I thought since the QueryString was simply a collection there
would be a way to .Add() to that collection.


The QueryString represents what you received in the HTTP request and is immutable.
In order to change the QueryString, you'd have to redirect to your page using
a URL that includes the updated QueryString. This of course requires an extra
round trip.

Cheersm
--
Joerg Jooss
ne********@joergjooss.de
Jan 26 '06 #4
The Request.QueryString is actually a NameValueCollection. However, if you
are building a new Uri you will need to write custom code that accepts name
and value parameters (for example, as a NameValueCollecition input parameter,
constructs the querystring, and returns the complete uri string to the caller
of the method.
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Joerg Jooss" wrote:
Hello netnet,
Thank you Peter, I was looking for something that would actually place
a value in the querystring, not hide it in the form, or server memory.
I wanted to use the query string so that a user would have something
to bookmark, sorry I didnt make my objective more clear in my inital
post. I thought since the QueryString was simply a collection there
would be a way to .Add() to that collection.


The QueryString represents what you received in the HTTP request and is immutable.
In order to change the QueryString, you'd have to redirect to your page using
a URL that includes the updated QueryString. This of course requires an extra
round trip.

Cheersm
--
Joerg Jooss
ne********@joergjooss.de

Jan 27 '06 #5

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

Similar topics

2
by: Danny | last post by:
I want to extract a subset of fields from one table into another the master table has many fields the subset has about half, but still many. Is there a way I can just append the master into the...
0
by: karinski | last post by:
Hi All, I have a split f/e - b/e setup on my database with RWOP queries on the front end. The code below gets a PO number(s), and vendor name from a multi choice list box on another form. It...
13
by: Lee | last post by:
Hello All, First of all I would like to say thank you for all of the help I have received here. I have been teaching myself Access for about 4 years now and I've always been able to find a...
5
by: solar | last post by:
I have copied a function that appends from table orders2 into table orders1 the row that has the value SubOrder = True in the table orders2. This function finds the highest ordered in the table...
5
by: robertmeyer1 | last post by:
Hey, I have 2 append queries. The first is based off of code given and works great. For the second, I followed the format of the 1st and adjusted it to meet my needs. Query 1 works great. It...
7
by: Tobiah | last post by:
I wanted to do: query = "query text" % tuple(rec.append(extra)) but the append() method returns none, so I did this: fields = rec fields.append(extra) query = "query text" % tuple(fields)
2
by: SolomonShavitzMetsFan | last post by:
I am writing for lack of a better word a "mini program" within a form that does a lot of other things and is a bound form for other purposes. The form (frmCustDetail) is bound to another table...
4
by: jcethiopia | last post by:
Hi I'm a new user with Access and I need help with some VBA syntax. I am trying to run an append query using a string SQL statement. Basically, I need to append to "tbl_All" various fields from two...
2
by: sesling | last post by:
In VB, I have created an append query that will write the results to a table. To each of the records being written, I want to include the user name of the person running the query. I know how to...
4
by: dougmeece | last post by:
Morning Everyone... I have a table that needs to be append to and also updated. All the fields in the table are populated with data from the text boxes and combo boxes on a form. The Date...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...
0
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...

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.