How to view an Alert from the Asp.net mvc controller

Asked

Viewed 1,327 times

0

How to display a alert or a Response.Write of controller, on screen, to know if you are going through it ?

  • On screen or console?

  • @Ciganomorrisonmendez On screen, like, I’m making a change and it’s not showing, I wonder if you’re going through this controller with an Alert or a Sponse.write.

  • 1

    The right way to do this is by putting breakpoints in the Controller, not casting Response.Write. That’s extremely crude to do.

  • @Ciganomorrisonmendez Puts then, the bad thing is that I’m inside the iis and this project is a mess, has mvc parts and parts in classical Asp. Then there was a problem and it was left for me. rs. I’m moving through the Otepad++ .. :(

  • You can’t even debug your application, that’s it?

  • @Gypsy Heart Mendez, yeah. I’m having to tinker inside the IIS.

  • Don’t need all this back. You can create a project format Web Site inside Visual Studio importing the IIS directory into it and debugging it there.

  • @Gypsy ?

  • What’s the big deal?

  • @Gypsy Rrisonmendez thought it would not work.

  • Take a test ;)

Show 6 more comments

1 answer

2


You can return an alert:

return JavaScript("<script>alert(\"método CarregarGrid()\")</script>");
  • 1

    More this way will open a blank page script content, as it would display the message box?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.