I am working in Microsoft Visual Web Developer 2010 express on an asp.net website. I got following codes;
In file Web Config
<configuration>
<connectionStrings>
<add name="ConnectionString" connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=ReplaceToken\abcDATA.accdb;Persist Security Info=True;Jet OLEDB:Database Password=abc"
providerName="System.Data.OleDb" />
</connectionStrings>
<system.web>
<compilation debug="false" strict="false" explicit="true" targetFramework="4.0" />
</system.web>
</configuration>
In file Default.aspx
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True"
DataSourceID="SqlDataSource1" DataTextField="PickList"
DataValueField="PickList">
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>"
SelectCommand="SELECT [PickList] FROM [T_BAS_PASexport]">
</asp:SqlDataSource>
In Web Config file on ConnectionString line I want to replace the word ReplaceToken to the current directory path on application/website run. Please can someone help me that how can I do this. What code I need to put in my Default.aspx.vb file and after that what I need to change in my Default.aspx file. A brief explanation would be much appreciated.