asp.net - Can I Use one model attribute two times in one view -
i using visual studio 2013 framework 4.
i have 1 model attribute firstname.
this model
[required] [display(name = "investigator")] public string firstname { get; set; }
this view using:
in dropdownlist:
@html.dropdownlistfor(model => model.firstname, model.names, "enter new ...", new { @id = "ddlnames" }) @html.validationmessagefor(model => model.firstname)
in textbox:
@html.editorfor(model => model.firstname)
i using dropdownlist selection , in dropdownlist have 1 option add new first name , on click on giving option add new first name text box having same name means (firstname) model of razor new entry.
so question can use firstname attribute of model dropdownlist selection , new entry well.
i getting value in dropdownlist selection when enter new first name value not coming.
please knows me solve this.
thanks in advance.
Comments
Post a Comment