M
Matthew Louden
It happend to me more than once. When I create web controls or move the
positions in VS.NET, I encountered the following run-time errors: It doesn't
matter what controls I create, the following 'checkbox' control is just an
example.
Control 'CheckBox1' of type 'CheckBox' must be placed inside a form tag with
runat=server.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.Web.HttpException: Control 'CheckBox1' of type
'CheckBox' must be placed inside a form tag with runat=server.
Source Error:
An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.
I know it's very easy to solve the problem, we simply move the code inside
the form block as follows:
<form id="Form1" method="post" runat="server">
'UI code
</form>
Maybe it's bug in VS.NET. I just want to see if anyone encountered similar
problem before.
Please advise. Thanks!
positions in VS.NET, I encountered the following run-time errors: It doesn't
matter what controls I create, the following 'checkbox' control is just an
example.
Control 'CheckBox1' of type 'CheckBox' must be placed inside a form tag with
runat=server.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.Web.HttpException: Control 'CheckBox1' of type
'CheckBox' must be placed inside a form tag with runat=server.
Source Error:
An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.
I know it's very easy to solve the problem, we simply move the code inside
the form block as follows:
<form id="Form1" method="post" runat="server">
'UI code
</form>
Maybe it's bug in VS.NET. I just want to see if anyone encountered similar
problem before.
Please advise. Thanks!