Re: Adding name-value pair to QueryString Collection?

Tech-Archive recommends: Fix windows errors by optimizing your registry



Why not just concatenate it with the url, for instance
"Webform2.aspx?sessid=" + _formSessionId.

"Joe" <Joe@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:CE7DF639-0AF6-407C-A562-9A7E2C5C6F4A@xxxxxxxxxxxxxxxx
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 server control that ultimately redirects
him/her to WebForm2.aspx [using
Response.Redirect(String.Concat("WebForm2.aspx?", **a function that
re-creates the QueryString **)].

I need to persist the value of _formSessionId between the initial post and
the postback (after the Button control is clicked). I would like to add
the
value to the QueryString collection, since I will need the value in
WebForm2.aspx. I, however, have found that the QueryString's NameValue
collection is read-only.

Does anyone know how I can do this? Is there a better way?
--
Joe


.


Quantcast