The Scenario:
i have in web.config in appSettings a key:
<add key="stylet" value="http://localhost/style.css"/>
i have an .cs file with the following code:
response.ContentType = "text/html";
response.Write("<html>");
response.Write("<head>");
response.Write(@"<title>See the page</title>");
response.Write(@"<link rel='stylesheet' type='text/css' />");
response.Write("</head>");
response.Write("<body>");
response.Write("<br /><table style='width: 500px'>");
response.Write("<tr><td class='ArticleIntro'>");
response.Write(propertyValue);
response.Write("</td></tr>");
response.Write("</table>");
response.Write("</body>");
response.Write("</html>");
The Question:
How do i request the key in the .cs file?
You can use ConfigurationManager class for this: