我有 kendodropdown,我想将选定的值从 kendodropdown 填充到单击编辑按钮后的文本框。我使用 mvc.razor。请帮忙。控制器1/视图1
@(Html.Kendo().DropDownList()
.Name("labeldropdown")
.DataTextField("Tasks")
.DataValueField("ID")
.OptionLabel("Select label")
.AutoBind(true)
.HtmlAttributes(new { @style = "width: 72px;font-size:12px; " })
.DataSource(source =>
{ source.Read(read =>
{
read.Action("BindStates", "Resource");
});
})
.SelectedIndex(0)
)
<input type="button" value="New" class="k-button" id="newLabel" />
<input type="button" value="Edit" class="k-button" id="editLabel" />
控制器1/视图2
<input type="button" value="OK" class="k-button" id="labelok" /><br />
<input type="button" value="Cancel" class="k-button" id="labelcancel" />
@Html.TextBox("labeltxt", null, new { @class = "k-textbox" })