Modify .resx file at runtime
- by Gerry Whitworth
Building a ASP.NET MVC site and I would like to add some values to my .resx file at run time.
I have tried:
IResourceWriter writer = new ResourceWriter("myResources.resources");
writer.AddResource("String 3", "Third String");
writer.Close();
This code compiles and executes fine but after I close the website and look at the .resx file it is corrupt and I must re-create the .resx file again. Note that I have two values in this .resx file I added at design time.
Thanks
Gerry