I want to post a form on html and process the variables with asp.net code, like writing a php code. do I have to use <% %> or can I create an empty file with
<script runat=server>
</script>
You just need to get the postback values using the Request.Form.
This exposes all the input values in properties.
Look at this:
If you have an iput with id "name", you can read the user input like so:
Request.Form["name"]
The result is always a string, so that you'll need to parse it to convert it to another data type.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.