I cant for the life of me find any site that can explain how to go about answering below. I know that the "lbtTitle.Text = " section is correct but the rest I am lost. A point in the right direction would be of great help.

You are adding a Resource file "MyResources.resx" to the global resources folder. You are also adding a new name "Title" to the file and have set the value to "Kenexa". How do you assign the value of "Title" to a Label (lbtTitle) in the code behind of a web form?

A. lbtTitle.Text = MyResources.Title
B. lbtTitle.Text = Resources.MyResources.Title
C. lbtTitle.Text = MyResources.Get("Title")
D. lbtTitle.Text = Resources.MyResources.Get("Title")

Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

Munawar HussainConnect With a Mentor Principal Software EngineerCommented:
You need to use ResourceManager to read Resource File . here is example
 private static ResourceManager _resourceManager;
public static void InitializeResources()
        Assembly resourceAssembly = Assembly.GetExecutingAssembly();
        _resourceManager = new ResourceManager(
             "ResourcesDemo.TextRes", resourceAssembly);
        _resourceManager.IgnoreCase = true;
             //This is my preference. You can change this...

public static string GetString(string key)
        string s = _resourceManager.GetString( key );
        if( null == s ) throw(new Exception());
        return s;
        return String.Format("[?:{0}]", key);

YOU may fine working example here

samtran0331Connect With a Mentor Commented:
With ASP.Net 2.0, you don't have to do all that to read a resource file.

You didn't add your usual starting comment of "This isn't an exam or homework".
And as you did make the comment that you tried to research this, what I don't understand is
1. Why you couldn't find it by googling something like " 2.0 global resources"
2. If you just set up a test project, you could have figured it out yourself quicker that researching it.

It took me all of 3 minutes to set up the exact scenario you ask about and test it.
The answer is in the list you provided, and even if you tested by process of elimination, you would find the answer in a max of 15 minutes...

cybernation989Author Commented:
Oh I did find the answer I just couldnt deleted the post due to needo_jee posting
All Courses

From novice to tech pro — start learning today.