Monday, July 29, 2013

How to open 3306 port on Windows 2008 for MySQL?

In command line as administrator, run following command:
netsh advfirewall firewall add rule name="MySQL Server" action=allow protocol=TCP dir=in localport=3306

Reference:
http://www.activeservers.com/page3610203.aspx

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()