J
John
Hi
I have dragged a few controls over to a web form. The html code generated is
as follows;
<asp:TextBox id="StaffCode" runat="server"></asp:TextBox>
<asp:Button id="Submit" runat="server"
Text="Submit"></asp:Button>
<asp:RequiredFieldValidator id="RequiredFieldValidator1" runat="server"
ErrorMessage="Code field can not be blank." Width="192px"
ControlToValidate="StaffCode"></asp:RequiredFieldValidator>
When I run the web form I get the following message;
Control 'StaffCode' of type 'TextBox' must be placed inside a form tag with
runat=server
What changes do I need to make to my web form? Obviously I am very new to
asp.net.
Thanks
Regards
I have dragged a few controls over to a web form. The html code generated is
as follows;
<asp:TextBox id="StaffCode" runat="server"></asp:TextBox>
<asp:Button id="Submit" runat="server"
Text="Submit"></asp:Button>
<asp:RequiredFieldValidator id="RequiredFieldValidator1" runat="server"
ErrorMessage="Code field can not be blank." Width="192px"
ControlToValidate="StaffCode"></asp:RequiredFieldValidator>
When I run the web form I get the following message;
Control 'StaffCode' of type 'TextBox' must be placed inside a form tag with
runat=server
What changes do I need to make to my web form? Obviously I am very new to
asp.net.
Thanks
Regards