Hey everyone. I am attempting to use a DropDownListFor, however it always results in a crpytic error.
Here is the code:
<div class="TheClass">
@(Html.Kendo().DropDownListFor(a => a.WorkId)
.Name("WorkId")
.DataTextField("WorkName")
.DataValueField("WorkId")
.DataSource(source => {
source.Read(read =>
{
read.Action("GetWork", "Work");
});
})
.HtmlAttributes(new { tabindex = 0 })
)
</div>
During design time, the first line is underlined with a red squiggle mark and it says "(...) "cannot be inferred from the usage".
When I run the code, it blows up with the following error. "CS1593: Delegate 'System.Action' does not take 1 arguments"
What is the problem here?
Here is the code:
<div class="TheClass">
@(Html.Kendo().DropDownListFor(a => a.WorkId)
.Name("WorkId")
.DataTextField("WorkName")
.DataValueField("WorkId")
.DataSource(source => {
source.Read(read =>
{
read.Action("GetWork", "Work");
});
})
.HtmlAttributes(new { tabindex = 0 })
)
</div>
During design time, the first line is underlined with a red squiggle mark and it says "(...) "cannot be inferred from the usage".
When I run the code, it blows up with the following error. "CS1593: Delegate 'System.Action' does not take 1 arguments"
What is the problem here?