Sometimes we need to run *.sql script from our application for installing data base. SqlCommand is not right for running installation script because installation script consists of DDL and GO command. Here we use smo library for executing *.sql script.
Use Asp.net Session from Class Library (or Class Library Project)
Add First we need to add System.Web as a reference on our project. Continue reading