如何使用弹出窗口在mvc中显示此消息

时间:2016-08-20 13:39:58

标签: c# asp.net-mvc

如何在弹出窗口中显示此消息?我试图在MVC中弹出这个消息。

string m = "Customer Deleted Successfully.";
return Json(new { Result = "Success", message = m },JsonRequestBehavior.AllowGet); 

请帮帮我。

1 个答案:

答案 0 :(得分:1)

这是一种在ajax中获取服务器端响应的方法..

   $.ajax({
    ...
    ...
    success:function(data)
     {
       if(data.Result == 'Success')
       {
        alert(data.message);
       }
     }
    })

代替提醒您可以使用Bootstrap modalJquery DialoagToast notification ..