C#
public ActionResult Async()
{
return View();
}
// Submit this page to begin processing
[AcceptVerbs(HttpVerbs.Post)]
public JsonResult Async(FormCollection collection)
{
try
{
// some test data
var records = new ArrayList();
for (var i = 0; i < 10; i++)
records.Add(i);
...
Tuesday, October 14, 2014
Thursday, October 9, 2014
October 09, 2014
Most people coming to ASP.NET MVC tend to have similar problems. Most of them are related to refreshed understanding of HTML+HTTP limitations. Some are mitigated by ASP.NET MVC (checkboxes), but a lot require custom solutions.
One of the more common problems I get asked about by every second person learning MVC is how to make a form with two independent submit buttons, where both should submit the same data, but a have a different processing...
October 09, 2014
When creating a new MVC project in ASP.NET MVC 5, Bootstrap is already included. For some reason proper formatting for form errors (the red colored error message and the red border around the controls) are not working. There are loads of articles and blog posts how to change this and that to enable this, but in ASP.NET MVC 5, the only thing you actually have to do is add a few classes to your Site.css file. Why they aren’t in there from the...