Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 695
natiz Avatar asked Dec 02 '10 15:12

natiz


1 Answers

Set "clientidmode" attribute to "static" on the form tag to prevent the framework from override your name/id with "aspnetForm". This was driving me nuts for hours.

like image 51
parliament Avatar answered Oct 13 '22 11:10

parliament