[AcceptVerbs(HttpVerbs.Post)]
public ActionResult AddLm(string txtLm, string txtSid)
{
if ((new Lm_BLL()).addLm(txtLm, txtSid))
{
return RedirectToAction("fenlei", "admin");
}
else
{
return JavaScript("alert('插入失败');"); }
}
插入失败的时候没有弹出提示框,而是出现了下载,下载下来的文件打开内容是返回的JavaScript内容
刚学mvc请指教。谢谢
return JavaScript("alert('插入失败');");//javascript是个什么东东?
我们以前做MVC的时候 都是结合 jquery 将弹出信息放到另外一个页面
而那个页面是一个公共的页面 根据不同的信息弹出对话框!