How can I inspect the post data that are being submited In my application? I want see If there are any data In the input fields when the post are submited.
Html:
<div id="addBox" style="display: none; margin-top: 10px;">
@using (Html.BeginForm())
{
@Html.AntiForgeryToken()
<div class="form-group">
@Html.Label("Descrption", "Att göra"):
@Html.TextBox("Description", null, new { id = ViewBag.ListContainerID })
<input type="submit" value="Ok" class="btn btn-default" />
</div>
}
</div>
Controller:
[HttpPost]
[ActionName("Details")]
public ActionResult AddTask(FormCollection values)
{
var id = values["id"];
var desc = values["Description"];
/*Task task = new Task
{
Description = desc,
ListContainerID = id
};
db.Tasks.Add(task);
db.SaveChanges();*/
return RedirectToAction("Details");
}
I have tried to set a breakpoint beside the id and desc, but can't find the information about what the input field contains.