Wednesday, March 25, 2015

Validation

[required(ErrorMessage="Your {0} is required ") ]
[StringLength(160), Minimumlength =3) ]
[RegularExpression (@"[A-Za-z0-9._%+-]

[Range(35,44)]
[Range(typeof(decimal), "0.00","49.99")]

[Compare("Email")]
Public string Email confirmation {get; set;}

[Remote("CheckUserName"),"Account")
Public string Username {get;set;}

How to:Set the Culture and UI Culture for ASP.NET Web page Globalization

TryUpdateModal
UpdateModal

[HttpPost]
Var newOrder=new Order()
UpdateModel(newOrder) ;
If(ModelStates.IsValid )
{
Return RedirectToAction(
}
Return View(newOrder)

If (TryUpdateModel (newOrder)

Nuget MaxWordsAttribute

Class Order : IValidatableObject

[Display(Name="First Name",  order=15000)]

Order default is 10000

[ScaffoldColumn (false)

ApplyFormatInEditMode=true

[ReadOnly(true)]
DataType (DataType.password

UIHint
HiddenInput

No comments:

Post a Comment