Hi, i am working on silverlight project, i need to have all the node info on my xaml page in its code behind. How to call this web config file from my silverlight code behind. Please suggest a nice description or any related thread
A web.config is not supported in Silverlight. The System.Configuration namespace is doesn't exist in Silverlight.
But you can write your own code for reading out the app settings of your config file by using the xml reader classes:
public static string GetSomeSetting(string settingName)
var valueToGet = string.Empty;
var reader = XmlReader.Create("XMLFileInYourRoot.Config");
if (reader.NodeType == XmlNodeType.Element && reader.Name == "add")
valueToGet = reader.GetAttribute("key");
if (!string.IsNullOrEmpty(valueToGet) && valueToGet == setting)
valueToGet = reader.GetAttribute("value");
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.
Would you like to participate?