protected void Page_UnLoad(object sender, EventArgs e) { DateTime d = System.DateTime.Now; string cn = "Data Source=hcl;Initial Catalog=mydata;Integrated Security=True"; SqlConnection con = new SqlConnection(cn); SqlCommand cmd = new SqlCommand("insert into mydate values(@d)", con); con.Open(); cmd.CommandType = CommandType.Text; cmd.Parameters.Add(new SqlParameter("@d", d)); // cmd.Parameters.Add(new SqlParameter("@b", b)); cmd.ExecuteNonQuery(); con.Close(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)