读取指定的Appsettings的值

public ActionResult EditWebSiteUser(string key)
{


AppSettingsReader reader =
new AppSettingsReader();

String value = String.Empty;
value = (String)reader.GetValue(key, value.GetType());
string[] strValue = value.Split(',');
string webservicesAddress = strValue[0];
string method = strValue[1];
ViewData["key"] = key;
ViewData["webservicesAddress"] = webservicesAddress;
ViewData["method"] = method;
return View();
}

你可能感兴趣的:(set)