Tuesday, March 31, 2015

Datepicker in Asp.net MVC

Step :1

Create a MVC 4 default Application
















Step :2

Copy below 2 folders and paste in ur original app


Step :3

Create DateTime Template under "EditorTemplates" Folder


Step :4





Saturday, March 28, 2015

How to set ReadOnly and HiddenInput in MVC



 ReadOnly and HiddenInput in MVC

[System.Web.Mvc.HiddenInput(DisplayValue=false)]
public int ID { get; set; }

[System.ComponentModel.ReadOnly(true)]
public string Name { get; set; }

Opening Page in New Browser Window in Asp.Net MVC



Opening Page in New Browser Window in Asp.Net MVC in 2 Ways


  1. Create a view in shared folder with name "Url" 
  2. Using  UIHint

       [DataType(DataType.Url)]
       [UIHint("BlogUrl")]
       public string BlogUrl { get; set; }

Display Column and Datatype in Asp.net MVC