Click here to Skip to main content
15,911,306 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
In my Project, I have many folders. how can i create a resource file for all folders in same place
Posted

1 solution

The best way is to create a separate Class Library project for them, and include them there as Resources in the Resourses.resx file in the usual way. If you make sure that the each of the resources is declared public using the "Access Modifier" drop down on the Resources page, you can then add a reference to the DLL in your other projects and access the stings, images, etc via the static Properties object of that namespace:
C#
Image myImage = myPropertiesProjectName.Properties.Resources.TheNameOfTheImageIWant;
 
Share this answer
 
Comments
durga.r 22-Jun-12 3:12am    
Already i created a Local Resource file for all folders.Each resource file is under the particular folder but i need all local resource file in App_local Resource folder how can i merge that..
Sandeep Mewara 22-Jun-12 5:27am    
You are talking of Global resources. What you have right now is local resource files.
Read:
http://msdn.microsoft.com/en-us/library/ms227427.aspx
http://msdn.microsoft.com/en-us/library/ms247246%28v=vs.80%29.aspx

You need to decide and then do it from start. AFAIK, there is no easy way to convert the local into global ones.
durga.r 22-Jun-12 7:46am    
local resourcefile only i used.... How can i merge all files in single folder

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900