samedi 9 mai 2015

I want to generate this textbox with a model's I.d when i'm creating and also making the textbox uneditable

This is my model

    [Key]
    public int ConsultId { get; set; }

`

This is my View `

    @Html.LabelFor(model => model.ConsultId, htmlAttributes: new { @class = "control-label col-md-2" })

        @Html.IdFor(m=>m.ConsultId)

        @Html.ValidationMessageFor(model => model.ConsultId, "", new { @class = "text-danger" })

What I want to do is,i want the textbox for the ConsultId to be autogenerated

Aucun commentaire:

Enregistrer un commentaire