ASP.NET出错了,麻烦大家了!

Anrylxp Anrylxp 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
Server Error in '/' Application.
--------------------------------------------------------------------------------

Control 'calendar1' of type 'Calendar' 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 'calendar1' of type 'Calendar' must be placed inside a form tag with runat=server.

Source Error:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

<%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

Stack Trace:


[HttpException (0x80004005): Control 'calendar1' of type 'Calendar' must be placed inside a form tag with runat=server.]
System.Web.UI.Page.VerifyRenderingInServerForm(Control control) +151
System.Web.UI.WebControls.Calendar.Render(HtmlTextWriter writer) +184
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +243
ASP.default_aspx.__Render__control1(HtmlTextWriter __output, Control parameterContainer) +67
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +27
System.Web.UI.Control.Render(HtmlTextWriter writer) +7
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +243
System.Web.UI.Page.ProcessRequestMain() +1929



...全文

相关推荐

评论 4
收藏 已收藏
分享
返回顶部
Anrylxp
.NET社区 62,271 成员 668,968 内容