Reputation: 45
In Visual Studio, I have the folder app_localresources with 2 resources: example.aspx.resx and example.aspx.en.resx. example.aspx.resx file was created automatically and the another is a copy, but in the solution I have: example.aspx, example2.aspx, example3.aspx... How do I add more resources files automatically?
Upvotes: 1
Views: 340
Reputation: 45
I've found the solution, just it's to be in design mode and next click in the menu tools-> generate local resource.
Upvotes: 1
Reputation: 1969
What do you mean by "automatically"? It seems that you could use this MSDN article. Code excerpt taken from this article:
using (ResXResourceWriter resx = new ResXResourceWriter(@".\CarResources.resx"))
{
resx.AddResource("Title", "Classic American Cars");
resx.AddResource("HeaderString1", "Make");
resx.AddResource("HeaderString2", "Model");
resx.AddResource("HeaderString3", "Year");
resx.AddResource("HeaderString4", "Doors");
resx.AddResource("HeaderString5", "Cylinders");
resx.AddResource("Information", SystemIcons.Information);
}
Upvotes: 0