ADO Net Database ASP.Net Tutorial


  
             connectionString="Data Source=.\SQLEXPRESS;
         AttachDbFilename=|DataDirectory|MyDatabase.mdf;Integrated Security=True;User Instance=True" />
  


You can add as many connection strings to the connectionStrings section as you want. 
<%@ Page Language="C#" %>
 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">


    Show Products


    
    

            id="grdProducts"
        DataSourceID="srcProducts"
        Runat="server" />
            id="srcProducts"
        SelectCommand="SELECT * FROM Products"
        ConnectionString="<%$ ConnectionStrings:Products %>"
        Runat="server" />