我是做MVC的新手,在中間有人指點我。如何在MVC 2中使用C#顯示和隱藏Div aspx
我想根據控制器操作隱藏div
。
查看代碼:
<div id="mudetails" runat="server" style="width: 99%; padding-top: 4%">
</div>
這裏面的內容我的父母DIV存在。
控制器代碼。
public ActionResult Index()
{
// div "mudetails" should not apper
return View();
}
public ActionResult Index(string textbox)
{
// div "mudetails" should apper
}
在頁面加載的div
不應該出現,但是當ActionResult Index(string textbox)
動作triggerd的div
應該會出現。我嘗試,但沒能找到正確的解決方案。