how can i do a form POST from a regular html file. and call a .net file that ends with .aspx what would my html file require?
3 Answers
<form method="Post" action="YourNETFile.aspx">
... other form elements
</form>
Then on your aspx code behind, you can get to the form elements with: Request.Params["FormElementName"]
1 Comment
ChrisLively
The only thing I would add is that your aspx file might need to have viewstate validation turned off.
something of the form
<form action="location of aspx" method="Get|post">
<input name="variable name" value="variable value" type="text|hidden|etc" />
</form>
Comments
Just put it as the action of the form. All you need to remember is to make sure your fields are named what the CodeBehind expects.
Cheers!
p.s. It seems that posting answers is now a game of "beat the clock"
1 Comment
Zhaph - Ben Duguid
Heh, posting answers has been a game of "beat the clock" for some time ;)