ASP.NET表单 - 表单名称\\ ID更改aspnetForm

问题描述:

我有这样的code:

<form Name="AddPlace" ID="AddPlace" action="AddPlace.aspx" class="niceform" method="post" runat="server">

当我尝试执行code我得到这个代替:

That when i try to execute the code i get this instead:

<form name="aspnetForm" method="post" action="AddPlace.aspx" id="aspnetForm" class="niceform">

为什么它的变化?

How come it changes?

ASP.NET Web表单接管表单元素控制;举例来说,如果你试图改变的动作,ASP.NET会忽视它改回来...为什么你需要一个特定的ID?为什么不能aspnetForm工作?

ASP.NET web forms takes control over the form element; for instance, if you try to change the action, ASP.NET will ignore it and change it back... why do you need a specific ID? Why won't aspnetForm work?

心连心。