Click here to Skip to main content
15,886,963 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I wrote the code like:

C#
div class="editor-label">
    @Html.LabelFor(model => model.Designation)
</div>
<div class="editor-field">
   @Html.DropDownList("CategoryID")
     @Html.ValidationMessageFor(model => model.Designation)
</div>


But When I click A submit Button to save the value in database it doesn't pass anything to the controller.

Would you please help me to pass the value for the the label ??
Posted

See here[^]
 
Share this answer
 
Comments
rayhan12345 16-Jul-14 0:47am    
I saw that, And also can't do that!! The value doesn't save in the database.. Please help me :-(
use displayFor at place of LabelFor

PLease check and confirm.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900