我需要更改树视图图标并启用/禁用复选框,
请查看以下代码:
function LoadJSTree() {
$.noConflict();
$(function () {
$('#demoTree').jstree({
'checkbox': {
'keep_selected_style': false,
'two_state': true
},
"types": {
"#": {
"max_children": 1,
"max_depth": 4,
"valid_children": ["root"]
},
"root": {
"icon": "/static/3.1.1/assets/images/tree_icon.png",
"valid_children": ["default"],
"check_node": false,
},
"default": {
"valid_children": ["default", "file"],
"check_node": true,
"uncheck_node": true
},
"disabled":{
"check_node": false,
"uncheck_node": false
},
"file": {
"icon": "glyphicon glyphicon-file",
"valid_children": [],
"check_node": true,
"uncheck_node": true
}
},
"plugins": ["types"],
'core': {
'data': [
{
"text": "Root node", "type": "root", "parent":"#", "children": …Run Code Online (Sandbox Code Playgroud) 我正在尝试通过我的 C# 代码在运行时更新一些配置设置。这是我的 web.config 部分
<appSettings>
<add key="webpages:Version" value="3.0.0.0" />
<add key="webpages:Enabled" value="false" />
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
<add key="URL" value="google.com"/>
<add key="Domain" value="d"/>
<add key="Project" value="p"/>
</appSettings>
Run Code Online (Sandbox Code Playgroud)
这是我正在使用的代码:
Configuration config = WebConfigurationManager.OpenWebConfiguration("~");
System.Configuration.ConfigurationManager.AppSettings.Remove("URL");
System.Configuration.ConfigurationManager.AppSettings.Add("URL","www.stackoverflow.com");
config.Save();
Run Code Online (Sandbox Code Playgroud)
但是,它给出了我的配置文件是只读的错误。我正在使用 Visual Studio 2013。我应该如何解决这个问题?