views:

128

answers:

1

If I create a Web Application project in visual studio 2008 I can add a resource file for a page and using the Access Modifier drop down in the resource file editor to let visual studio generate the code so that the local resources are strongly typed. However if I create a Web Site project this combo box is disabled. Is there anyway to acheive this for a web site?

A: 

you can using

GetLocalResourceObject("yourkey").ToString();

Plz check this thread for details....

http://stackoverflow.com/questions/1202999/issue-with-getlocalresource-object

Muhammad Akhtar
That's not strongly typed. I want to reference a resource item like you can with global resources e.g. string text = Resource.YourKey;This is definately possible with the Web Application project.
Chris Herring
@Chris: I don;t think it is possible, what you are looking.. the only possible way to local Resources is what I have give you in my answer
Muhammad Akhtar