By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,708 Members | 2,080 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,708 IT Pros & Developers. It's quick & easy.

Setting the outgoing querystring

P: n/a
I would like to be able to set the querystring for the URL used for a
postback (the action attribute of the form). The Form property of the page
does not give access to this property, and I do not want to set the entire
value by using the Attributes property. Is there any simple property that
can be used to add to the outgoing querystring? Thanks.

Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/
Aug 15 '08 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Nathan Sokalski" <ns*******@kyledavidgroup.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
I would like to be able to set the querystring for the URL used for a
postback (the action attribute of the form). The Form property of the page
does not give access to this property, and I do not want to set the entire
value by using the Attributes property. Is there any simple property that
can be used to add to the outgoing querystring? Thanks.
Is this not for an ASP Classic / ASP.NET app...?

Assuming it's ASP.NET, there's no need to to this - this isn't the way
ASP.NET postbacks work at all...

If you need to persist information from client-side to server-side so that
it is available to a postback, put it in a hidden field:
http://msdn.microsoft.com/en-us/libr...ddenfield.aspx
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Aug 15 '08 #2

P: n/a
I understand that using a hidden field is a common (and normally good) way
to persist information, but here is a more detailed description of my
situation:

As a search technique, I am offering users the ability to use the
querystring. This will allow them to bookmark a specific search, as well as
simplify situations in which I create links and redirects to the page for
the purpose of displaying certain results. When a certain action is taken on
the page and it is posted back, I want the most recent search to be
displayed. I would like to only need to check one thing (in this case
QueryString) to see if I should display a specified search or the default
search. And regardless of why I am using it here, I would like to know a
simple way to add to the querystring without using string manipulation. Any
ideas?

"Mark Rae [MVP]" <ma**@markNOSPAMrae.netwrote in message
news:uN**************@TK2MSFTNGP05.phx.gbl...
"Nathan Sokalski" <ns*******@kyledavidgroup.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>I would like to be able to set the querystring for the URL used for a
postback (the action attribute of the form). The Form property of the
page does not give access to this property, and I do not want to set the
entire value by using the Attributes property. Is there any simple
property that can be used to add to the outgoing querystring? Thanks.

Is this not for an ASP Classic / ASP.NET app...?

Assuming it's ASP.NET, there's no need to to this - this isn't the way
ASP.NET postbacks work at all...

If you need to persist information from client-side to server-side so that
it is available to a postback, put it in a hidden field:
http://msdn.microsoft.com/en-us/libr...ddenfield.aspx
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Aug 15 '08 #3

P: n/a
"Nathan Sokalski" <ns*******@kyledavidgroup.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>I would like to be able to set the querystring for the URL used for a
postback (the action attribute of the form). The Form property of the page
does not give access to this property, and I do not want to set the entire
value by using the Attributes property. Is there any simple property that
can be used to add to the outgoing querystring? Thanks.

Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/
Server-side buttons have the PostBackUrl property, does this help?

Jeff
Aug 15 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.