473,581 Members | 2,648 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 9156
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.Redire ct.

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*******@yaho o.nospammin.com > wrote in message
news:D4******** *************** ***********@mic rosoft.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.Redire ct.

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********@joer gjooss.de
Jan 26 '06 #4
The Request.QuerySt ring is actually a NameValueCollec tion. 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 NameValueCollec ition 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********@joer gjooss.de

Jan 27 '06 #5

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

Similar topics

2
1837
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 subsets structure and this way only the existing fields in the destination will be filled? That would be great, but it seems that the append query...
0
1745
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 then assigns these values, plus a new receiving number, to the current form. The SQL string is an append query that copies select fields from the PO...
13
4217
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 solution here - until now. This one is driving me crazy. I am making my first attempt at creating a runtime application. I am using Access 2003...
5
2241
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 orders2. But I want to find the highest ordered in the table orders2 instead. In short, I want to append the order from the table orders2 into the...
5
2063
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 appends each specific clientId to the table when the command button from form 1 is selected (code below). The 2nd query works as well. But it will...
7
1644
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
2425
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 ("tblCalls")than that to which I want to write. I want to have a button that is called "AddCalls" like below that calls an append query that opens a...
4
5738
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 different tables. I need this to be dynamic because depending on what the user selects, it needs to take fields from a specific table. I am...
2
5051
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 get the user name but do not know how to insert it, even if I can, into the append query. Is this possible? I have the statement I am running now. I...
4
2398
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 Submitted defaults to 1/1/00 if the cboSubmittedBox field is "No". Otherwise it is selected from a calendar. The Date Entered field defaults to the current...
0
7792
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8149
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8304
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7899
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8175
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6553
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
2301
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 we have to send another system
1
1403
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1138
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.