Asp. NET form forms can not be nested use _ Practical tips

Source: Internet
Author: User

I'm pretty sure that there are multiple form forms in the ASP that you used to do, in the background Classification Admin page, add and modify on the same page, so you need to use two form forms for submitting server code processing.

After testing, ASP.net can also have multiple form forms on a page, such as the following code:

<form id= "Form1" ></form><form id= "Form2" ></form><form id= "FORM3" ></form>

However, form forms cannot be nested, for example, the following code is incorrect:

<form id= "Form1" ><form id= "Form2" ></form></form>

It is also important to note that in asp.net, when there are multiple form forms in a page, only one form is allowed to have runat= "server" attributes, otherwise an exception is generated. This is some of the asp.net programming of children's shoes often make mistakes!

In ASP.net's programming mode, there are few situations where two or more form forms appear on a page. The function submitted to the server code can be done through a outermost form form, no need to do so much, this is asp.net and ASP differences!

I hope you can remember this!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.