omran malik

omran malik

  • NA
  • 1
  • 0

sql datasource connection string in ASP.NET 2.0

Oct 4 2005 9:04 AM
I  want to put connection string outside the working directory in a file like udl which can be used in asp. i know in asp.net 2.0 sql datasource connection string property refers to connection string in web config file. But i want to put connection string in a fileout side the directory. i know how to create a udl file. my question how would i refere to a udl in sql data source connection string porperty for e.g in


<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConflictDetection="CompareAllValues"

ConnectionString="<%$ ConnectionStrings:pubsConnectionString %>"

OldValuesParameterFormatString="original_{0}"

SelectCommand="SELECT * FROM [authors] WHERE ([au_id] = @au_id)"



ProviderName="<%$ ConnectionStrings:pubsConnectionString.ProviderName %>">

</asp:SqlDataSource>


as you can do FileName="C:\myfile.udl" in asp how would you create a udl type deployment in asp.net 2.0