How to read web.config appsettings or connection strings from .aspx file
Web.Config:
<appSettings><
add key="appSettingsKey" value="Testing Input"/></appSettings>
<connectionStrings><
add name="con_string" connectionString="Data Source=TestServer;Initial Catalog=TestDB;Integrated Security=SSPI" providerName="System.Data.SqlClient"/></connectionStrings>
.aspx Page
<asp:TextBox ID="txtAppSetting" runat="server" Text="<%$appSettings:appSettingsKey %>"></asp:TextBox>
<asp:TextBox ID="txtConnectionString" runat="server" Text="<%$connectionStrings:con_string %>"></asp:TextBox>
by using <%$appSettings:appSettingsKey %> , we can read the app settings data of Web.Config
Solution for the QlikView, Biztalk, DotNet and MSBI real time development problems
Search This Blog
Friday, November 27, 2015
Subscribe to:
Posts (Atom)
Popular Posts
-
Error : Could not store transport type data for Receive Location 'EAISolutionReceiveRequestLocation' to config store. Prima...
-
I am getting below error while executing stored procedure from C# (Ado.net, entity framework) String[2]: the Size property has an invalid ...
-
Migration from Visual Studio 2008 to 2013 Without any code changes I successfully migrated from VS 2008 to 2013 but when running website f...
-
Exception : Microsoft.WindowsAzure.StorageClient.StorageClientException was unhandled Message=One of the request inputs is out of ran...
-
Review the permissions of the user that you're trying to impersonate. In my situation, I was only getting the error on my development ...