how to insert datetimepicker into sql server unsig linq to sql?
datetime Project_StartDate ;
Project_StartDate = Convert.ToDateTime( dateTimePicker1.Text)
Try This
protected void Button1_Click(object sender, EventArgs e) { txtdob.Text = Convert.ToDatetime(retrieveddatefromtable).ToString("dd/MM/yyyy") linq_to_sql_classesDataContext context = new linq_to_sql_classesDataContext(); Customer custid = new Customer(); custid.dob = Strings.Trim(txtdob.Text); ontext.Customers.Attach(custid); context.SubmitChanges(); }
© COPYRIGHT 2024 ASPSnippets.com ALL RIGHTS RESERVED.