Mega Code Archive

 
Categories / ASP.Net / ADO Database
 

Connection to Sql Express (VB net)

<%@ Page Language="C#" %> <html xmlns="http://www.w3.org/1999/xhtml" > <head id="Head1" runat="server">     <title>Show Local Connection</title> </head> <body>     <form id="form1" runat="server">     <div>          <asp:GridView         id="grdEmployee"         DataSourceID="srcEmployee"         Runat="server" />              <asp:SqlDataSource         id="srcEmployee"         SelectCommand="SELECT * FROM Employee"         ConnectionString="Data Source=.\SQLEXPRESS;             AttachDbFilename=|DataDirectory|MyDatabase.mdf;             Integrated Security=True;User Instance=True"         Runat="server" />               </div>     </form> </body> </html>