您好我发现分析器错误问题
我创建了一个Global.asax文件,并编写代码
private void Application_BeginRequest(Object source, EventArgs e)
{
string[] languages = HttpContext.Current.Request.UserLanguages;
if (languages[0].ToLower() != null && languages[0].ToLower()!="")
{
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(languages[0].ToLower());
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture(languages[0].ToLower());
}
}
,并定义标签筛选
多语种Asp.Net Web应用程序的问题<asp:Label ID="Labeldg" runat="server" Text="<%$ Resources:Resource, Labeldg %>"</asp:Label>
但是,通过分析程序错误,如:
Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: The resource object with key 'LblUsrName_Login' was not found. Source Error:
</div>
<div class="impcLoginText_Login">
<asp:Label ID="LblUsrName" runat="server" Text="<%$ Resources:PageResource, LblUsrName_Login %>" "></asp:Label>
我看到这个错误吗?你是说你尝试在你的global.asax中添加一个标签吗? – David 2009-09-22 13:19:51