How do I post a form from an HTML page to and ASPX page (2.0) and be able to read the values?
I currently have an ASP.NET site using the Membership provider and everything is working fine. Users can log in from the Login.aspx page.
We now want to be able to have users log in directly from another web site–which is basically a static HTML page. The users need to be able to enter their name and password on this HTML page and have it POST to my Login.aspx page (where I can then log them in manually).
Is it possible to pass form values from HTML to ASPX? I have tried everything and the Request.Form.Keys collection is always empty. I can't use a HTTP GET as these are credentials and can't be passed on a query string.
The only way I know of is an iframe.
Best Solution
This is very possible. I mocked up 3 pages which should give you a proof of concept:
.aspx page:
code behind:
Separate HTML page:
...and it regurgitates the form values as expected. If this isn't working, as others suggested, use a traffic analysis tool (fiddler, ethereal), because something probably isn't going where you're expecting.