How to display an error message box in a web application asp.net c#

后端 未结 7 1387
小蘑菇
小蘑菇 2020-12-03 18:28

I have an ASP.NET web application, and I wanted to know how I could display an error message box when an exception is thrown.

For example,

                 


        
7条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-03 18:48

    The way I've done this in the past is to populate something on the page with information when an exception is thrown. MessageBox is for windows forms and cannot be used for web forms. I suppose you could put some javascript on the page to do an alert:

    Response.Write("");
    

提交回复
热议问题