views:

50

answers:

3

can a forms action url contain querystring values?

+2  A: 

Yes, it can.

(Keystrokes)

Matti Virkkunen
I bet this will be a looong answer. Matti has been typing for 16 minutes now ;)
Fredrik Mörk
Yeah, couldn't find anything in the HTML Spec regarding appending QS params along with `POST`ed form data. Awaiting Matti's findings...
Alexander
@Alexander: don't stay up; it's way past midnight in Finland by now. I'll check back in tomorrow.
Fredrik Mörk
@Fredrik I'm still waiting here in South Fla, USA. Got 5-1/2 hrs to midnight ;)
Alexander
A: 

I've just checked using a reduced test case:

  • Form.htm that contains a form with an action of default.aspx?query=1 and a submit button.
  • default.aspx that contains code in Page_Load to write out Request.QueryString["query"]

The result I got when clicking on the button was a page that read:

1

So, the answer is yes.

Rob
A: 

Change to Method="GET" to pass the insensitive data to the server...

Review this to get a handle on the topic...

http://www.w3.org/TR/html401/interact/forms.html#form-data-processing

http://www.w3.org/TR/html401/interact/forms.html#submit-format

Alexander