Here is the simple insert query to insert data into database using mssql server. protected void Button1_Click( object sender, EventArgs e) { string constr = ConfigurationManager .ConnectionStrings[ "ApplicationServices" ].ConnectionString; SqlConnection con = new SqlConnection (constr); SqlCommand cmd = new SqlCommand ( "insert into tbl_view values(@Name,@EmailID,@view,@Activity,@DateTime)" ); cmd.CommandType = CommandType .Text;