This is a migrated thread and some comments may be shown as answers.

[Solved] Get selected value from Dropdownlist

0 Answers 46 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
John
Top achievements
Rank 1
John asked on 12 Apr 2012, 05:53 PM
I am just starting to use Telerik controls. I am trying to get the selected value from a dropdownlist to automatically bind to model. Here is my code

@(Html.Telerik().DropDownList()

.Name(

 

"ClientDropDown")

.HtmlAttributes(

 

new { style = "width: 200px" })

.BindTo(

 

new SelectList(Model.Clients, "ClientId", "ClientName", Model.SelectedClientId))

)


But the value returned in the controller method is always zero. Any ideas what is wrong?

Thanks,
Tags
General Discussions
Asked by
John
Top achievements
Rank 1
Share this question
or