Define your connection string in web.config file as:
<connectionStrings>
<add name="connString" connectionString="...." />
</connectionStrings></pre>
And use it as follows:
<pre lang="C#">ConfigurationManager.ConnectionStrings["connString"].ToString();