Answered by:
localization and globalization in resource.resx and i have error in this

Question
-
User1037591003 posted
%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged"> <asp:ListItem Value="hi-in">hindi</asp:ListItem> <asp:ListItem Value="en-gb">english</asp:ListItem> <asp:ListItem Value="frc-fr">france</asp:ListItem> </asp:DropDownList> </div> </form> </body> </html>
%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default4.aspx.cs" Inherits="Default4" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <asp:Label ID="Label1" runat="server" Text="<%$Resources:Resource,photo%>"></asp:Label> </div> </form> </body> </html>
And i also add resource.in-hi.resx,resource.en-gb.resx and resource.frc-fr.resx in app-globalresources.
Server Error in '/' Application. Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS0101: The namespace 'Resources' already contains a definition for 'Resource' Source Error: Line 24: [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] Line 25: [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] Line 26: public class Resource { Line 27: Line 28: private static global::System.Resources.ResourceManager resourceMan; Source File: c:\Users\WELCOME-PC\AppData\Local\Temp\Temporary ASP.NET Files\vs\05991b72\6430a067\App_GlobalResources.3k0bpfp9.1.cs Line: 26 Show Detailed Compiler Output: Show Complete Compilation Source:
this above error is shown to me..
Thursday, January 5, 2017 12:20 PM
Answers
-
User-271186128 posted
Hi oneprachi,
CS0101: The namespace 'Resources' already contains a definition for 'Resource'As for this issue, please check the culture name is correct.
Here are some relevant threads with the same error, you could refer to them:
https://forums.asp.net/t/1206789.aspx?+The+namespace+Resources+already+contains+a+definition+for+
Best regards,
Dillion- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, January 6, 2017 7:51 AM
All replies
-
User-271186128 posted
Hi oneprachi,
CS0101: The namespace 'Resources' already contains a definition for 'Resource'As for this issue, please check the culture name is correct.
Here are some relevant threads with the same error, you could refer to them:
https://forums.asp.net/t/1206789.aspx?+The+namespace+Resources+already+contains+a+definition+for+
Best regards,
Dillion- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, January 6, 2017 7:51 AM -
User1037591003 posted
Thank you Dillion for helping me to remove error and finding solution. I found the error with your references.
Friday, January 6, 2017 9:51 AM