public ActionResult Completed()
{
ViewBag.PersonalInfo="";
ViewBag.Experience="";
ViewBag.Work="";
}
[HttpPost]
public ActionResult Publication(MainPageModel obj)
{
ViewBag.PersonalInfo="";
ViewBag.Experience="";
ViewBag.Work="";
}
[HttpGet]
public ActionResult Publication(MainPageModel obj)
{
ViewBag.PersonalInfo="";
ViewBag.Experience="";
ViewBag.Work="";
}
我将这个ViewBag与这三个动作一起使用但是我想使用类似的方法 喜欢
public void methodname()
{
ViewBag.PersonalInfo="";
ViewBag.Experience="";
ViewBag.Work="";
}
并使用不同的操作methodname()
怎么做MVC4?
是否可以编写类似方法?