asp.netformssubmitchanges

ASP.NET Form - The form name\id changes to aspnetForm


I have this code:

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

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?


Solution

  • 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?

    HTH.