I think you cant get the textbox value directly,can use Formcollection class, in this class you will get value of all the controls present on form.
[HttpPost]
public ActionResult Edit(int id, FormCollection collection)
{
using (LoginModelDataContext objLoginModelDataContext = new LoginModelDataContext())
{
string Isupdate = collection["ckbStatus"];
if (Isupdate == "true,false")
{
objLoginModelDataContext.insertStatusOfGoal(id);
}
var recordToUpdate = objLoginModelDataContext.GoalDetails.Single(m => m.Id == id);
TryUpdateModel(recordToUpdate);
if (ModelState.IsValid)
{
objLoginModelDataContext.SubmitChanges();
return RedirectToAction("Index");
}
return View(recordToUpdate);
}
}
In this code i am getting the value of checkbox,in the same way you can get the value of textbox.
hope this will help