dnnnet

导航

怪异的报错:DotNetNuke.Services.Exceptions.ModuleLoadException:The Runat attribute must have the value Server

最近在做一个DotNetNuke的模块,在页面调试过程中发现了一个怪异的抛出异常 The Runat attribute must have the value Server。

仔细阅读报错详细信息其中主要的信息是:Runat的值必须为Server,百思不得其解,代码看了几遍无意中发现

 <asp:TextBox ID="txtSearchR" runat="server "  value="请输入职位或企业名" CssClass="txt"></asp:TextBox>

中的 runat="server " server后面多了一个空格,去掉空格后发现模块就运行正常。

问题不大,但如果不仔细查找不容易发现错误,故拿出来和大家分享一下!希望能帮您一下!

 

Error: is currently unavailable.
DotNetNuke.Services.Exceptions.ModuleLoadException: The Runat attribute must have the value Server. ---> System.Web.HttpParseException: The Runat attribute must have the value Server. ---> System.Web.HttpParseException: The Runat attribute must have the value Server. ---> System.Web.HttpException: The Runat attribute must have the value Server. at System.Web.UI.TemplateParser.ProcessError(String message) at System.Web.UI.TemplateParser.ProcessAttributes(Match match, ParsedAttributeCollection& attribs, Boolean fDirective, String& duplicateAttribute) at System.Web.UI.TemplateParser.ProcessBeginTag(Match match, String inputText) at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding) --- End of inner exception stack trace --- at System.Web.UI.TemplateParser.ProcessException(Exception ex) at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding) --- End of inner exception stack trace --- at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseReader(StreamReader reader, VirtualPath virtualPath) at System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath virtualPath) at System.Web.UI.TemplateParser.ParseInternal() at System.Web.UI.TemplateParser.Parse() at System.Web.UI.TemplateParser.Parse(ICollection referencedAssemblies, VirtualPath virtualPath) at System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType() at System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider) at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath) at System.Web.UI.TemplateControl.LoadControl(String virtualPath) at DotNetNuke.UI.Skins.Skin.InjectModule(Control objPane, ModuleInfo objModule, PortalSettings PortalSettings) in D:\webroot\DotNetNuke_Community_04.09.02_Source\Library\Components\Skins\Skin.vb:line 489 --- End of inner exception stack trace ---

posted on 2010-06-10 20:09  sjgkkk  阅读(592)  评论(0编辑  收藏  举报