locked
localization and globalization in resource.resx and i have error in this RRS feed

  • 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

All replies