MessageBox is not used in Asp.net .. If response. write ("#######"), it will be displayed directly on the page ######, which looks messy and not beautiful, it is not easy to see. It is better to use a dialog box. Method: write directlyCode: Response. Write ("<SCRIPT> window. Alert ('#######'); </SCRIPT>. Response. write ("<SCRIPT> alert ('#######'); </SCRIPT>"); after the prompt is successful, go to the response page. write ("<SCRIPT> window. alert ('prompt statement'); window. location = 'abc. aspx '</SCRIPT> "); In Asp.net, you may want to pop up some information boxes when performing an operation: the warning message box popped up by alert, the confirm pop-up dialog box contains the confirmation and cancellation buttons, and the input data dialog box popped up by prompt. There are two methods to achieve this. (1) Alert usage: Response. Write ("<SCRIPT> alert ('incorrect password! ') </SCRIPT> "); (2) Use of confirm: Response. Write (" <SCRIPT> window. Confirm (' Are you sure you want to delete it? '); </SCRIPT> "); (3) Use of prompt: response. write ("<SCRIPT> var result = Window. prompt ('Enter the new file name: '), 'abc'); If (result! = NULL) Alert ('your input is '+ result); </SCRIPT> ");"