protected void Button2_Click(object sender, EventArgs e)
{
DateTime? joingdate;
joingdate = DateTime.ParseExact(joing.Text, "dd/MM/yyyy",null);
SqlCommand cmd = new SqlCommand("insert into acmaster(Name,Addr1,Mobile,Emailid,Panno,Nominee,Relation,Sponcerid,Sponcustno,Itemcode,Itemprice,commission,joing)values('" + customer.Text + "','" + adderss.Text + "','" + mobile.Text + "','" + emailid.Text + "','" + panno.Text + "','" + nomineen.Text + "','" + nomineer.Text + "','" + rankcode.Text + "','" + custno.Text + "','" + productid.Text + "','" + prize.Text + "','"+commission.Text+"'.'"+d+"')", con);
cmd.CommandType = CommandType.Text;
try
{
con.Open();
cmd.ExecuteNonQuery();
// Label25.Text = "data Inserted";
Response.Write("<script>alert('Data Save....')</script>");
con.Close();
clearfield();
}
catch (Exception ex)
{
Label25.Text = ex.Message;
}
}