Its simple.
create new aspx page.
press F7 to go to code behind ie. aspx.cs file.
Ok. Now create to create a class. right click your project -> say add New --> select class --> rename it as DbOperations
it will look like below example
public class DbOperation
{
private static SqlConnection conn= new SqlConnection("write connection string here..");
public static void Insert(param1,param2)
{
SqlCommand cmd =new SqlCommand();
cmd.CommandText="insert into table .... param1,param2.."
cmd.Connection=conn;
con.open()
cmd.ExecuteNonQuery();
con.close()
}
}
you can easily get code for creating connetcion and executing command using c#. just google a while or you can read articles here ..
Bhasker, if this helps please login to Mark As Answer. | Alert Moderator