Setting the outgoing querystring

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/
 
N

Nathan Sokalski

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?
 
J

Jeff Dillon

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
 
N

Nathan Sokalski

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.
 
J

Jeff Dillon

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top