How can I use two form web control in a aspx file

RiseeSibsmoow

New Member
I use two ascx file that content a <form...runat=server> independently, but got compiler error can't content two forms in a .aspx, every one can help me ....ASP.NET will only allow one <form runat="server"> control per page, which includes any custom controls or include files nested within it. Thus, it is the better practice to never include the <form runat="server"> in your ascx file, but instead to implement it in the aspx file and then call your ascx controls from there. That way, no matter where you place your ascx files, you know they will not conflict with existing forms.
 
Back
Top