.net mvc hide or show element code example
Example 1: asp.net mvc hide div from controller
@Model bool
@if (model) {
<div id="mudetails" runat="server" style="width: 99%; padding-top: 4%">
</div>
}
Example 2: asp.net mvc hide div from controller
public ActionResult Index()
{
// div "mudetails" should not apper
return View(false);
}
public ActionResult Index(string textbox)
{
// div "mudetails" should apper
return View(true);
}