Creating MS SQL Database & Tables & adding Connection String to web.config file in ASP.NET

In this tutorial we will create MS SQL database using the SQL server management studio. The SSMS is a user interface provided my Microsoft to interact with the MS SQL server database. We will create the database & also create the tables that we need for our E-library management system web application.
We will also create database connection string & add it in our Web.config file of the ASP.NET application. We will be using this connection string to perform database connectivity in future development.

Watch the video tutorial at the end of this video to understand more about how to create this page & apply custom styling. Use the code given below.

Download all Images for this project – CLICK HERE

Web.config file  Page Code –
<?xml version="1.0" encoding="utf-8"?>

<!--
  For more information on how to configure your ASP.NET application, please visit
  https://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>
  <connectionStrings>
    <add name="con" connectionString="Data Source=DESKTOP-CP5TFRU\SQLEXPRESS01;Initial Catalog=elibraryDB;Integrated Security=true" />
  </connectionStrings>
  <system.web>
    <compilation debug="true" targetFramework="4.7.2"/>
    <httpRuntime targetFramework="4.7.2"/>
  </system.web>
  
  <system.codedom>
    <compilers>
      <compiler language="c#;cs;csharp" extension=".cs"
        type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
        warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701"/>
      <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"
        type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
        warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+"/>
    </compilers>
  </system.codedom>

</configuration>
YouTube video tutorial –

Leave a Reply

Your email address will not be published. Required fields are marked *