0

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 3

3
<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"]

Sign up to request clarification or add additional context in comments.

1 Comment

The only thing I would add is that your aspx file might need to have viewstate validation turned off.
0

something of the form

<form action="location of aspx" method="Get|post">
   <input name="variable name" value="variable value" type="text|hidden|etc" />
</form>

such as: http://www.w3.org/TR/html401/interact/forms.html

Comments

0

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

Heh, posting answers has been a game of "beat the clock" for some time ;)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.