Setting the outgoing querystring

  • Thread starter Thread starter Nathan Sokalski
  • Start date Start date
N

Nathan Sokalski

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
(e-mail address removed)
http://www.nathansokalski.com/
 
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?
 
Nathan Sokalski said:
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
(e-mail address removed)
http://www.nathansokalski.com/

Server-side buttons have the PostBackUrl property, does this help?

Jeff
 
No, unfortunately it doesn't, because for one thing, I am not triggering my
postback using a Button. Also, the PostBackUrl still requires you to enter a
string, which means I would need to do string manipulation in order to set
it. I would like to have a property that gives me access to the action
attribute of the form tag (maybe something like Page.Form.Action) so that I
can set the URL that I will be posting back to so that I can specify where
controls such as DropDownLists and CheckBoxes that use the
AutoPostBack="True" property postback to, including the querystring. Any
ideas? Thanks.
 
Perhaps a HTTP handler

Nathan Sokalski said:
No, unfortunately it doesn't, because for one thing, I am not triggering
my postback using a Button. Also, the PostBackUrl still requires you to
enter a string, which means I would need to do string manipulation in
order to set it. I would like to have a property that gives me access to
the action attribute of the form tag (maybe something like
Page.Form.Action) so that I can set the URL that I will be posting back to
so that I can specify where controls such as DropDownLists and CheckBoxes
that use the AutoPostBack="True" property postback to, including the
querystring. Any ideas? Thanks.
 
Back
Top