Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8099179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:19:10+00:00 2026-06-05T22:19:10+00:00

I have project asp.net with namespace test and I’m using resources (files Resource.resx and

  • 0

I have project asp.net with namespace test and I’m using resources (files Resource.resx and Resource.en-GB.resx). I have in resources key MY_TEXT with value. In file .aspx I can use

<%# Resources.Resource.MY_TEXT %>

but when I’m using (like in article http://msdn.microsoft.com/en-us/magazine/cc163566.aspx)

myLabel.Text = Resource.MYTEXT; 

It don’t found it and I have build error. Why?

Best regards,
Dagna

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T22:19:13+00:00Added an answer on June 5, 2026 at 10:19 pm

    Try something like this:

    myLabel.Text = Resources.Resource.MYTEXT;
    

    Let me know if it works or what kind of error the compiler gives you.

    You can also write it as you wrote in your question, click on Resources to put cursor there, hit Ctrl + . and select a namespace to be added. This should make Visual Studio detect a valid Resource namespace (or suggest few available namespaces) automatically.

    Update

    This article explains how to use resources in code behind:
    http://msdn.microsoft.com/en-us/library/ms227982%28v=vs.85%29.aspx. I mentioned it in comments and it helped you, so I’m adding it as a part of an answer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ASP.net MVC 3 project with resource files setup in folders like:
I have a project in ASP.NET MVC1 using VB.NET controlers and JqGrid. it works
I have a project that needs to be done using ASP.NET. Currently, I'm using
i am using asp.net framework 4 and i have created brand new project and
I have an ASP.net project which involves using a custom IHttpModule. This module will
I am using an ASP.Net Web Application project. I have a user control which
Folks, I have an ASP.NET project which is pretty n-tier, by namespace, but I
I have a question I have a project asp.net mvc which is developed in
I have a multi-project ASP.NET + C# solution. I was planning on writing a
i need to have one project on asp.net mvc 1 but i want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.