在mvc 4中使用粉底显示模态 [英] using foundation reveal modal in mvc 4
问题描述
我试图使用基础显示模式来更新局部视图。
无法使用它。返回/ Billing / Test / Add with Testinggggg作为文本。
还有如何使用会话变量?
testcontroller add(动作)
------------------- -------
[HttpPost]
公共ActionResult添加(FormCollection集合)
{
试试
{
Session [abc] =模态弹出窗口;
返回PartialView(_ testpartial);
}
catch
{
返回查看();
}
}
-------------- ----------
_testpartial -partial view
------------ ---------------
Iam trying to use foundation reveal modal to update a partial view.
Cant get that to work. returning to /Billing/Test/Add with Testinggggg as text.
Also how to use session variable?
testcontroller add (action)
--------------------------
[HttpPost]
public ActionResult Add( FormCollection collection)
{
try
{
Session["abc"] = "Modal popup";
return PartialView("_testpartial");
}
catch
{
return View();
}
}
------------------------
_testpartial -partial view
---------------------------
-------------- ---------------
testcontroller-创建(查看)
@ {
ViewBag.Title =创建;
布局=〜/ Views / Shared / _Layout.cshtml;
}
添加lineitem
-----------------------------
testcontroller- Create (view)
@{
ViewBag.Title = "Create";
Layout = "~/Views/Shared/_Layout.cshtml";
}
Add lineitem
@ * @ {Html.RenderPartial(创建,客户) );} * @
@* @{Html.RenderPartial("Create", "Customer");}*@
@ {Html.RenderPartial(_ testpartial);
}
@{Html.RenderPartial("_testpartial");
}
创建
testcontroller:
--- ----------------------------
public ActionResult Create()
{
会话[abc] =初始;
返回查看();
}
---------------------------- ---------
Create
testcontroller:
-------------------------------
public ActionResult Create()
{
Session["abc"] = "Initial";
return View();
}
-------------------------------------
推荐答案
这篇关于在mvc 4中使用粉底显示模态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!