linq to sql - TextBox value not updated -


i fetching data database textbox using linq.when try update same textbox value,it not work.

dal.tournamentsdatacontext tdc = new schoolsports.dal.tournamentsdatacontext();         var tournamenttable = tdc.gettable<dal.tournament>();         var tournamentrecord = (from rec in tournamenttable                                 rec.tournamentid == tournamentid                                 select rec).single();                     tournamentrecord.tournament_type = tournament_type;         tournamentrecord.tournament_name = tournament_name; ;         tournamentrecord.tournament_level = tournament_level;         tournamentrecord.tournament_for = tournament_for;         tournamentrecord.country_code = country_code;         tournamentrecord.tournament_status = tournament_status;         tournamentrecord.tournament_begin_date = tournament_begin_date;         tournamentrecord.tournament_end_date = tournament_end_date;         tournamentrecord.sponsored_by = sponsored_by;         tournamentrecord.tournament_details = tournament_details;          var organisertable = tdc.gettable<dal.organiser>();         var organiserrecord = (from rec in organisertable                                rec.tournament_id == tournamentid                                select rec).single();             organiserrecord.name_of_organiser = orname;         organiserrecord.telephone = orteleno;         organiserrecord.email = oremail;         organiserrecord.mobile = ormobile;         organiserrecord.fax = orfax;          if (tournament_for == "school")         {              var invitedschoolidtable = tdc.gettable<dal.invited_school>();             var invitedschoolidrecord = (from rec in invitedschoolidtable                                          rec.tournament_id == tournamentid                                          select rec).single();             invitedschoolidrecord.school_ids = schooluniids;          }         if (tournament_for == "university")         {              var inviteduniversitytable = tdc.gettable<dal.invited_university>();             var inviteduniversityidrecord = (from rec in inviteduniversitytable                                              rec.tournament_id == tournamentid                                              select rec).single();             inviteduniversityidrecord.university_ids = schooluniids;          }         tdc.submitchanges(); 

(the following answer written before updated question)

if want value updated value in text box, text box must bound datasource


Comments

Popular posts from this blog

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

c++ - Convert big endian to little endian when reading from a binary file -