public ActionResult bindTicketDetails() { TicketModel t = new TicketModel(); try { int data = Convert.ToInt32(TempData["tickID"]); int a_id = Convert.ToInt32(Session["ApartmentID"]); DataTable dt = objgetTicket.FetchTicketDetail(Convert.ToInt32(data), a_id); t.TicketID = Convert.ToString(dt.Rows[0]["TICKET_ID"]); t.FIRSTNAME = Convert.ToString(dt.Rows[0]["FIRSTNAME"]); t.LASTNAME = Convert.ToString(dt.Rows[0]["LASTNAME"]); t.MOBILENO = Convert.ToString(dt.Rows[0]["MOBILENO"]); t.H_BLOCK = Convert.ToString(dt.Rows[0]["H_BLOCK"]); t.H_Number = Convert.ToString(dt.Rows[0]["H_Number"]); t.Type = Convert.ToString(dt.Rows[0]["TICKET_TYPE"]); t.Description = Convert.ToString(dt.Rows[0]["TICKET_DESC"]); t.Raised_Date = Convert.ToString(dt.Rows[0]["TICKET_RAISED_DATE"]); List <SelectListItem> lstTimeSlots = new List <SelectListItem>(); lstTimeSlots = objgetTicket.getSlots(); ViewBag.TimeSlots = lstTimeSlots; return(View(t)); } catch (Exception ex) { log.Error(ex); return(Json("Something went wrong..Try after some Time", JsonRequestBehavior.AllowGet)); } }