Hi
C#
public class Location
{
public Location()
{
}
[Key]
[Display(Name = "Id")]
public string Id { get; set; }
[DataType(DataType.Text)]
[RegularExpression(@"^[a-zA-Z'.\s]{1,25}$", ErrorMessage = "Special Characters not allowed")]
[Required(ErrorMessage = "Please enter Location"), MaxLength(25)]
[Display(Name = "Description")]
public string Description { get; set; }
[Required]
public bool IsActive { get; set; }
}
Python
@using (Html.BeginForm("CreateEdit", "Location", FormMethod.Post))
{
×Close
@Html.ValidationSummary(false, "", new { @class = "text-danger" })
Id
Description
Active
Cancel
Save Changes
}Thanks

Sachin SinghRank #66 · 26.2K reputationPosted Jun 12, 2021, 4:15 AM EDT
Ramco RamcoRank #462 · 5.4K reputationPosted Jun 12, 2021, 4:37 AM EDT
Sachin SinghRank #66 · 26.2K reputationPosted Jun 12, 2021, 4:58 AM EDT
Ramco RamcoRank #462 · 5.4K reputationPosted Jun 12, 2021, 5:09 AM EDT