开发者

How to detect Edit Resource file programatically at run time?

开发者 https://www.devze.com 2023-02-27 01:59 出处:网络
if resource file in a folder then we can edit this like XmlDocument loResource = new XmlDocument(); loResource.Load(Server.MapPath(\"/App_GlobalResources/TDLResources.de-DE.resx\"));

if resource file in a folder then we can edit this like

XmlDocument loResource = new XmlDocument();
        loResource.Load(Server.MapPath("/App_GlobalResources/TDLResources.de-DE.resx"));

        XmlNode loRoot = loResource.SelectSingleNode("ro开发者_StackOverflowot/data[@name='RequiredFields']/value");

        if (loRoot != null)
        {
            loRoot.InnerText = "test";
            loResource.Save(Server.MapPath("/App_GlobalResources/TDLResources.de-DE.resx"));
        }

but if resource file is merge with in assembly then how could i edit this. help will be appreciated.thanks


I doubt if that's possible if they are embeded resources. MSDN here suggest that it should be used as Linked Resource. Others also say the same thing

So see if something like this rescues you Edit embedded resource (Visual Studio)

0

精彩评论

暂无评论...
验证码 换一张
取 消