我正在使用 asp.net MVC 框架。在我的页面上,我有一个 dropdwonbox,当单击一个选项时,我想转到另一个页面。但我找不到如何/在哪里将 autopostback 属性设置为 true。这是我正在使用的代码:
ASP:
<%= Html.DropDownList("qchap", new SelectList( (IEnumerable)ViewData["qchap"], "Id", "Title" )) %>
控制器:
public ActionResult Index(int id)
{
Chapter c = new Chapter();
ViewData["qchap"] = c.GetAllChaptersByManual(id);
return View();
}
我必须做什么才能使用自动回发功能?