Ray's Asp.net Blog
Answers and code snippets from ASP.NET projects (Webforms/MVC/Classic ASP)
Pages
(Move to ...)
Event registration app with QR/Paypal
Home
▼
Thursday, November 29, 2012
How to read database connection string from web.config?
System.Configuration.ConfigurationManager.ConnectionStrings["connectionStringName"].ConnectionString;
How to generate ASPX dynamically?
By Razor engine
http://razorengine.codeplex.com/
string template = @"<%@ Control Language="C#" ClassName="@Model.Name" %>";
string result = Razor.Parse(template, new { Name = "Classname" });
‹
›
Home
View web version