2

I am new to MVC. I was using javascript alert in previous application from coding. How to give an alert from Controller?

Erik Funkenbusch
  • 92,674
  • 28
  • 195
  • 291
sugirthini
  • 47
  • 3
  • Here is an example of using JavascriptResult: http://stackoverflow.com/questions/1312408/asp-net-mvc-javascript-actionresult – Waqas Aug 15 '11 at 04:29

1 Answers1

0

In general, you could just have your controller set a boolean flag in ViewData and have your view render a script tag with the alert statement if that boolean flag is true.

btt
  • 422
  • 6
  • 16