Parser Error Problem
Posted
by user177140
on Stack Overflow
See other posts from Stack Overflow
or by user177140
Published on 2009-09-22T13:00:04Z
Indexed on
2010/05/14
10:04 UTC
Read the original article
Hit count: 176
ASP.NET
Hi I have found a problem in Multilingual Asp.Net Web Application
I have Created a Global.asax file and write the code
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());
}
}
and define Label Like this
<asp:Label ID="Labeldg" runat="server" Text="<%$ Resources:Resource, Labeldg %>"</asp:Label>
But it through Parser error like:
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>
© Stack Overflow or respective owner