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
-
What is SQL Injection SQL Injection is one of the most dangerous possible attacks we have to deal with as a web application developer, a...
-
For MVC Interview Questions Part 2 refer below link: http://challadotnetfaq.blogspot.co.uk/2013/12/mvc-interview-questions-and-answers_...
-
Qlikview developer, Designer and admin interview questions (Qlikview developer, Designer and admin FAQ’S) 1. Difference between Set ...
-
. Following code is useful to delete duplicate records. The table must have identity column, which will be used to identify the duplicate re...
-
Review the permissions of the user that you're trying to impersonate. In my situation, I was only getting the error on my development ...