title: how to show save data in the textbox
body: <pre><code>    public JsonResult SaveTimeSheet(List&lt;TaskHours&gt; TaskHours,TimeSheet ID)
      {
          try
          {
              foreach (TaskHours item in TaskHours)
              {
                  if (TaskHours != null)
                  {
  
  
                      string date = item.ID.Split(':')[1];
                      char[] arrDate = date.ToArray();
                      var dt = DateTime.Parse("" +
                          arrDate[0] + arrDate[1] + "/" +
                          arrDate[2] + arrDate[3] + "/" +
                          arrDate[4] + arrDate[5] + arrDate[6] + arrDate[7]);
  
  
                      //Save Timesheet
                      TimeSheet timeSheet = new TimeSheet();
                      var thisWeekStart = dt.AddDays(-(int)dt.DayOfWeek);
                      var thisWeekEnd = 
            thisWeekStart.AddDays(7).AddSeconds(-1);
                      timeSheet.StartDate = thisWeekStart;
                      timeSheet.EndDate = thisWeekEnd;
  
                         db.TimeSheets.Add(timeSheet);
                          db.SaveChanges();
  
                          //Save Timehsheet data
                          TimeSheetData timesheetdata = new TimeSheetData();
                          timesheetdata.Date = dt;
                           string Hours = item.Value;
                          timesheetdata.Hours = Convert.ToDouble(Hours);
                          timesheetdata.TimeSheet = timeSheet;
                          string TaskID = item.ID.Split(':')[0];
                          timesheetdata.TaskID = Guid.Parse(TaskID);
                          db.TimesheetData.Add(timesheetdata);
                          db.SaveChanges();
  
                  }
  
              }
  
  
  
              //Get Timesheet date               
              return Json(new { Result = "OK", Message = "Task Hours has been 
        saved successfully" });
  
          }
          catch (Exception ex)
          {
  
              return Json(new { Result = "ERROR", Message = ex.Message });
        }           
  
      }
              }
        }
  </code></pre>
  
  <p>When i pass data into the textboxes, the data is easy to save but i 
  want the saved data to be shown in a textbox. I want to retrieve the 
  data from the database and show it in the textbox.</p>
  
  <p>How do I check if timesheet exists for that week?
  If it doesn't show a blank timesheet.
  if it does exist then load that weeks data from the timesheet data table and pass it in json format to the view and then display the data.</p>
  
  <p>How would this be done?</p>