当您获取HTML页面并将其重命名为.aspx时,通常会发生这种情况。在VS.NET中创建Webform时,它会添加< form>标签带有runat属性和值server。如果你没有这个,你会得到这个 Lloyd, This usually happens when you take an HTML page and rename it to .aspx. When you create a Webform in VS.NET, it adds a <form> tag with a "runat" attribute and a value of "server". If you don''t have that, you''ll get this错误。 解决方法是添加一个< form>标记到页面。添加的最佳位置 error. The solution is to add a <form> tag to the page. The best place to addit直接位于开头< body>之下。标签。然后你将结束关闭< / form>关闭前的标签< / body>标签。例如: < body> < form name =" form1" runat =" server"> ...这里的页面内容... < / form> < / body> Jim Cheshire, MCSE,MCSD [MSFT] 开发人员支持 ASP.NET ja **** **@online.microsoft.com 此帖子按原样提供,不提供任何保证,也不授予任何权利。 ------- ------------- is directly under the opening <body> tag. You will then put the closing </form> tag right before the closing </body> tag. For example: <body> <form name="form1" runat="server"> ... page content here ... </form> </body> Jim Cheshire, MCSE, MCSD [MSFT] Developer Support ASP.NET ja******@online.microsoft.com This post is provided as-is with no warranties and confers no rights. -------------------- From:" Lloyd Sheen" < sq ******************* @ tostopspamhotmail.com> 新闻组:microsoft.public.dotnet.framework.aspnet 主题:HTML Designer问题行:15 X-Priority:3 X-MSMail-Priority:Normal X-Newsreader:Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE:由Microsoft MimeOLE制作V6.00.2800.1165 消息ID:From: "Lloyd Sheen" <sq*******************@tostopspamhotmail.com>Newsgroups: microsoft.public.dotnet.framework.aspnetSubject: HTML Designer ProblemsLines: 15X-Priority: 3X-MSMail-Priority: NormalX-Newsreader: Microsoft Outlook Express 6.00.2800.1158X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165Message-ID: < 2v ******************** @ twister01 .bloor.is.net.cab le.rogers.com> <2v********************@twister01.bloor.is.net.cab le.rogers.com>日期:2003年11月19日星期三03:32:14 GMT NNTP-Posting-Host:24.157.22.156 X-Complaints-To: ab***@rogers.com X-Trace:twister01.bloor.is .net.cable.rogers.com 1069212734 24.157.22.156Date: Wed, 19 Nov 2003 03:32:14 GMTNNTP-Posting-Host: 24.157.22.156X-Complaints-To: ab***@rogers.comX-Trace: twister01.bloor.is.net.cable.rogers.com 106921273424.157.22.156(2003年11月18日星期二22:32:14) (Tue, 18 Nov 2003 22:32:14 EST) NNTP-Posting-Date:Tue,2003年11月18日22:32:14 EST 路径:NNTP-Posting-Date: Tue, 18 Nov 2003 22:32:14 ESTPath: cpmsftngxa06.phx。 gbl!TK2MSFTNGP08.phx.gbl!newsfeed 00 .sul.t-online.de!t-onlincpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed 00.sul.t-online.de!t-onlin e.de!newsfeed。 freenet.de!newsfeed.tiscali.ch!solne t.ch!solnet.ch!newsfeed.moe.de!newsfeed.freenet.de!newsfeed.tiscali.ch!solne t.ch!solnet.ch!newsfeed.mo untaincable.net!cyclone01.bloor.is.net.cable.roger s.com!twister01.bloor.is.nuntaincable.net!cyclone01.bloor.is.net.cable.roger s.com!twister01.bloor.is.n et.cable。 rogers.com.POSTED!not-for-mail et.cable.rogers.com.POSTED!not-for-mail Xref:cpmsftngxa06.phx.gblXref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:191872X- Tomcat-NG:microsoft.public.dotnet.framework.aspnet 这个IDE让我疯狂。我需要另一个按钮,所以我复制了一个现有的按钮,通过拖动改变了文本和id和位置,并且 microsoft.public.dotnet.framework.aspnet:191872X-Tomcat-NG: microsoft.public.dotnet.framework.aspnetThis IDE is driving me nuts. I needed another button so I copied anexisting one, changed the Text and the id and position by drag and drop.Well然后我运行并得到以下内容: 控件''Button''类型'Button19''必须放在表单标签内 withrunat = server IDE可以不做它应该做的事情。似乎是drop.Well then I run and get the following:Control ''Button19'' of type ''Button'' must be placed inside a form tagwithrunat=serverCan the IDE not do what it is supposed to do. It seems that it is a 为了让它做任何事情或者我做错了什么?每当有可以复制属性的按钮时,似乎 fightto make it do anything or did I do something wrong? It would seem 愚蠢地创建一个新按钮???? 帮助请silly tohave to create a new button every time when there are buttons withattributes that can be copied????Help Please 这篇关于HTML Designer问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-20 15:49