How can I display a messagebox in ASP.NET?

前端 未结 13 2093
死守一世寂寞
死守一世寂寞 2020-11-30 11:30

I want to show a message box on the successful save of any item. I googled it and tried different solutions, but none of them worked. Here is the code I am using:

         


        
相关标签:
13条回答
  • 2020-11-30 12:08

    The best solution is a minimal use of java directly in the visualstudio GUI

    here it is: On a button go to the "OnClientClick" property (its not into events*) overthere type:

    return confirm('are you sure?')
    

    it will put a dialog with cancel ok buttons transparent over current page if cancel is pressed no postback will ocure. However if you want only ok button type:

    alert ('i told you so')
    

    The events like onclick work server side they execute your code, while OnClientClick runs in the browser side. the come most close to a basic dialog

    0 讨论(0)
提交回复
热议问题