HTML form variables lost on post

  • Thread starter Thread starter CCP
  • Start date Start date
C

CCP

I've got a simple HTML page containing a form and a few hidden
variables.
This form post into a .Net application (that lives in a seperate
directory).

The first thing I do in my codebehind is grab the values of the form
fields, however .net is unable to see these values. The entire
Request.Form object is empty. Request.Form.Count == 0. If I turn on
the tracing/debug output the form itself isn't even listed.

I am at a lost as to whats happening to my Form collection. If I
change the action of the form to submit to a ColdFusion page (for
example), cold fusion receives the post and has the form variables.

Anyone have any ideas why the post is emtpy?
 
Solved this one.

In the Web.Config, there is a setting for SessionState cookieless.
When this was set to "true" our form POSTS coming from a none .net
HTML page into a .net page were being treated as GETS.

Enabling cookies to establish our session corrected the situation.
Anyone have any ideas as to why?
 
As I remember the POST and GET HTTP protocols are disabled by default in
machine.config. You might have to enable them ( search in machine.config
for POST -- you will see that the protocol is commented out ) because
Microsoft wants us to use the XML/SOAP specification for things like Web
Services. HTTP/POST/GET is obsolete.
 
Back
Top