Sunday, 23 December 2018

Hiddeninput Attribute

HiddenInput attribute is useful when you want to render a property using input type=hidden. This attribute is extremely useful when you don't want the user to see or edit the property, but you need to post the property value to the server when the form is submitted to the correct record can be updated. HiddenInput is present in System.Web.Mvc namespace. 

[HiddenInput(DisplayValue=false)]
public int Id { get; set; }

No comments:

Post a Comment