i have a Webproject that is developed using ASP.Net 2.0 and i am using
Localization for it using a Global resource file.
my question is: i want to change the values of the Resource files .resx programmatically from the code behind file, i don't want to go the the .resx file manually and look for the string i want to change then change it by hand. because my
project is hosted on a web server and it takes a long time to download the file (.resx) , change it and then upload it again. its better if i just made a page in the administrator menu to directly change the resources i want.
thank you for your reply but there is another problem, the resxresourcewriter writes a new file to the application, it doesnot modify the existing one.
so is there a way to use it to modify an already existing resource file
None
0 Points
24 Posts
Modifying the Resources Files from Code behind?
Oct 29, 2006 08:50 AM|MostafaAdel|LINK
hi all,
i have a Webproject that is developed using ASP.Net 2.0 and i am using Localization for it using a Global resource file.
my question is: i want to change the values of the Resource files .resx programmatically from the code behind file, i don't want to go the the .resx file manually and look for the string i want to change then change it by hand. because my project is hosted on a web server and it takes a long time to download the file (.resx) , change it and then upload it again. its better if i just made a page in the administrator menu to directly change the resources i want.
Thanky you for your time,
Mostafa Adel
Development Team Leader
All-Star
24872 Points
4336 Posts
ASPInsiders
Moderator
MVP
Re: Modifying the Resources Files from Code behind?
Oct 29, 2006 03:49 PM|vcsjones|LINK
you can use the ResXResourceWriter in the System.Resources namespace.
http://msdn.microsoft.com/en-us/library/system.resources.resxresourcewriter.aspx
None
0 Points
24 Posts
Re: Modifying the Resources Files from Code behind?
Oct 30, 2006 07:21 AM|MostafaAdel|LINK
thank you for your reply but there is another problem, the resxresourcewriter writes a new file to the application, it doesnot modify the existing one.
so is there a way to use it to modify an already existing resource file
Contributor
2369 Points
908 Posts
Re: Modifying the Resources Files from Code behind?
Oct 31, 2006 02:10 AM|Gordon-Freeman|LINK