views:

459

answers:

2

Is it possible to show a javascript alert message from controller's action in asp.net mvc(C#)?

+3  A: 

You could pass a variable to the view. If it exists or is set to true, execute your javascript...

Paul
I have used json to call the action and execute the javascript.
Prasad
+1  A: 

No, controller actions are executed on the server side. Wheras Javascript is executed on the client side.

çağdaş