0

I want to display a message from the controller. I am using MVC4 with Extjs. I tried using:

Response.Write(@"<html><body><script language='javascript' type='text/javascript'> Ext.Msg.alert('Notification',' " + message + "')</script></body></html>");

But its not working. Any suggestions?

Thanks

Sam
  • 53
  • 2
  • 11

1 Answers1

1

you can return javaScript alert message from the controller like below

return Content("<script language='javascript' type='text/javascript'>alert(message);</script>");

hope this answer helps you..!

  • I am not returning anything. It is a simple method public void NotifyUser(string message) { Response.Write(@""); } – Sam Dec 03 '15 at 02:35