在不同的 DropDownList 中选择一个项目后,我想用 DropdownList 更改页面上的文本框(发生的更改是 bool 是真的,除此之外)。
$('#InvoiceNumber').replaceWith($(@Html.DropDownList("CategoryId", new SelectList(Model.Categories, "Value", "Text"), "Choose a category")));
但是会出现以下错误:
未捕获的 SyntaxError:意外的标识符
为什么会出现这种情况?