GET Vs POST in ASP.Net

  • Thread starter Thread starter Vaughn
  • Start date Start date
V

Vaughn

Hi

I have created a Form using HTML Elements (Client Side as opposed to
HTMLServer Controls). My code looks similar to the following:

<form id="Section1" action="Section2.aspx" method="post">

Then at the bottom of my form I have a submit button. When I submit the
form I get an HTTP 405 Error. However if I change the action in my form to
GET then the form seems to work and opens up the page Section2.aspx.

Why is the action="post" giving me an error? I prefer to use post as the
data being transmitted is not visible in the querystring.

Any help would be greatly appreciated!

Regards

Vaughn
 
Vaughn said:
Hi

I have created a Form using HTML Elements (Client Side as opposed to
HTMLServer Controls). My code looks similar to the following:

<form id="Section1" action="Section2.aspx" method="post">

Then at the bottom of my form I have a submit button. When I submit
the form I get an HTTP 405 Error. However if I change the action in
my form to GET then the form seems to work and opens up the page
Section2.aspx.

Why is the action="post" giving me an error? I prefer to use post as
the data being transmitted is not visible in the querystring.

You mean method="post", not action="post", I guess?

Probably your server is configured to refuse the POST method.
 
Hi Jos

Thanks for the post.. How would I configure IIS to accept bith get and post
methods?

Vaughn
 
Back
Top