Monday, July 22, 2013

How to use two views for one Action in ASP.NET MVC?

public ActionResult Process(id)
{
  if (Condition)
  {
    return View ('SpecialView')
  }
  else
  {
    return View (); //Default view 
  }
}

Friday, July 19, 2013

How to add a field to save current time in SQL Server?


In property window for that culumn:
set the "Default value or binding" getdate()

Thursday, July 18, 2013

How to add System.Web.Extensions reference in Console project?


In Visual Studio, project property page
Change Target Framework from Client profile to the full framework