Friday, May 2, 2014

How to add number only validation in ASP.NET MVC data model by Data Annotation attribute?

[Range(0, int.MaxValue, ErrorMessage = "Number please")]

How to solve, 401 unauthorized issue for ASP.NET Windows authentication in Visual studio 2013

Go to folder:
Documents\IISExpress\config

Open config file and Set windowsAuthentication to true
<windowsAuthentication enabled="true">

Wednesday, April 30, 2014

How to sovle problem, JavaScript runtime error: Object doesn't support property or method 'on'

To me,
I fixed this problem by using higher version jQuery
Originally, it was 1.5.3, changed to 1.8.3

Code snippet for reading configuration from config file

System.Configuration.ConfigurationManager.AppSettings["SettingKey"] == null ? "defaultValue" : System.Configuration.ConfigurationManager.AppSettings["SettingKey"].ToString();