简体   繁体   中英

How to display the alert message in mvc controler

I need to display the alert message in mvc controler(server side only not in client side). I have list of id in condition i need to display the all ids in my alert message. I try below code:

  if (id.Count > 0)
            {
              // here i need to display the alert message with my ids 
            }

Nature of web applications won't let you popup messages at the server side easily. But since you are in Visual Studio environment you can use System.Diagnostics.Debug.WriteLine to write messages to the output console (Ctrl+W, O).

For more advanced scenarios you can implement your own diagnostics sub-framework by using System.Diagnostics as a base.

Hope this helps

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM