开发者

Is it possible to write to a local resource file from code behind?

I've made a user control in asp.net and it's being used as a Sitefinity control. I've enabled localization and I have two local resource files, one default and another language. In开发者_C百科 Sitefinity when you drop a control onto the page you have the option of editing content and tags through Sitefinity. I want these values to come from the local resource file and I want to also be able to write/edit these values to the resource file.

One of my tags looks like this in the code behind (This is in C#):

[Category("Username Configuration")]
public string UsernameText
{
    get
    {
        return this.GetLocalResourceObject("UsernameText");
    }
    set
    {
        ??? = value;
    }
}

So when you edit the control and it brings up the config tool, under the category Username Configuration, there will be a string that was retrieved from the local resource, but I'm not sure how to (if at all possible) write a value to the .resx file.


It may help http://kishor-naik-dotnet.blogspot.com/2010/09/cnet-read-and-write-into-resx-file.html

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜