ASP.NET MVC Select list -
when user clicks edit button , user full profile information displayed in textbox , user can make changes in it.. problem : when user register , user selects option list of value below..
(i.e)
<select id="security_question" name="security_question"> <option value="choosequestion" style="font-style:italic;"> choose question ... </option> <option value="what first phone number?">what first phone number?</option> <option value="what vehicle registration number?">what vehicle registration number?</option> </select>
when user pressed edit button after logged in , have show select list , user selected value( selected when user registers ) should selected in list... how ????
thank you..
good morning assuming view strongly-typed viewmodel, let's entity called "useraccount" attribute called "secretquestion", setup select box using html helper "dropdownlistfor". set model property bound , mvc should handle rest.
Comments
Post a Comment