There is dropdown in abc page and values
323r
244f
and there is button and table
TID TTID
1 323r
2 244f
so when i select value from dropdown and click on button then value is save in table
and after this there is def page
in that there is label i save dropdown selected value in label
there is another table 2
in that
id TTID value3
1 323r 234
2 323r 456
so i want when i click on button which is def page want to save label value in TTID column in table 2
for this i try this in linq
- protected void Button2_Click(object sender, EventArgs e)
- {
- string TTID = "";
- tbl_fl_schedule ss = new tbl_fl_schedule();
- Data t = new Data();
- ss.TTID = TTID ;
- {
- ss.TTID = HttpContext.Current.Session["Vechilevalue"].ToString();
- }
- t.tbl_fl_schedule.Add(ss).ToString();
- t.SaveChanges();
- }
System.Data.Entity.Validation.DbEntityValidationException: Validation failed for one or more entities. See 'EntityValidationErrors' property for more details.
i want to do this through jquery
i try this
- public static void insertservies(string Vechile_ID)
- {
- tbl_fl_schedule ss = new tbl_fl_schedule();
- Data t = new Data();
- ss.TTID = TTID ;
- {
- //ss.Vechile_ID=
- ss.TTID = HttpContext.Current.Session["Vechilevalue"].ToString() ;
- }
- t.tbl_fl_Services_schedule.Add(ss).ToString();
- t.SaveChanges();
- }
but this is also not working
Manas MohapatraPosted Oct 24, 2016, 5:58 AM