我正在使用asp.net MVC框架。在我的頁面上我有一個dropdwonbox,當一個選項被點擊時,我想轉到另一個頁面。但我無法找到/如何將autopostback屬性設置爲true。這是我使用的代碼:C#如何設置使用asp.net mvc時的autopostback屬性?
.aspx的:
<%= 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();
}
我有什麼做的,使用自動回功能?
thnx。如果我想添加類屬性,我是否也必須使用相同的方式? – Martijn 2009-04-08 17:05:56