Last post Jan 06, 2013 08:20 AM by sarathi125
Jan 06, 2013 08:09 AM|gidmeister|LINK
I have a connectionstring in my web.config file. I saw a recommendation that this string be read by a shared class, and then my code should reference the class. The idea is that more abstraction makes things easier to change later. But in my sqldatasource,
I don't see how I could reference the property in this class that returns the connection string.
For instance, if I now have:
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ozerConnectionString %>"
can I replace that by
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ mySharedClass.ConnectionString %>" ?
Jan 06, 2013 08:20 AM|sarathi125|LINK
Check the following links