server controls need <form> tag?

hi 

i first desined aspx page in frontpage and then take it to VS.NET to add server controls ,
But it send the following error:
"Control 'TextBox1' of type 'TextBox' must be placed inside a form tag with runat=server"
i think it assume it as html control ,but i used form control,please help me
Regards
A.Doroudian
0
skyman763
11/3/2004 9:30:48 PM
asp.net.web-forms 93655 articles. 6 followers. Follow

4 Replies
606 Views

Similar Articles

[PageSpeed] 37
Get it on Google Play
Get it on Apple App Store

Correct. All server controls must be enclosed in form tags:

<form runat="server">
<!-- Your Controls -->
</form>
--Brian Desmond
Windows Server MVP - Directory Services
http://www.briandesmond.com
0
bdesmond
11/3/2004 9:53:05 PM
You might have better luck creating the page in VS and then using VS to create the ASP.NET control before tidying it all up in Frontpage. This helps as VS creates all the page declarations, the code behind page and adds the page to the project automatically. All this has to be done manually if you create the page in Frontpage/Dreamweaver first.
0
hkguy
11/3/2004 10:19:05 PM
Hi

Thanks all friend i solve it by your guides.
Regards
A.Doroudian
0
skyman763
11/6/2004 6:48:17 AM
The Literal control doesn't need to be inside a form tag for some reason
0
DavidRhodes
11/6/2004 3:39:20 PM
Reply: