How to make a simple yes/no popup in ASP.NET that return the result back to my c#?

前端 未结 7 1007
再見小時候
再見小時候 2020-12-21 01:05

With ASP.NET, how do I prompt the user for a yes/no question and getting the result back to my .ascx?

So far I can open a confirmation dialog with use of Javascript,

7条回答
  •  太阳男子
    2020-12-21 01:36

    I use this. As far as I know it prevents the rest of the button event from executing.

    btnMyButton.Attributes.Add("onClick", "return confirm('Are you really sure?')");
    

提交回复
热议问题