ASP.NET c# Fix for the OK event of a custom ConfirmMessagebox inside a function library

╄→尐↘猪︶ㄣ 提交于 2019-12-04 06:22:53

So you want to talk to the codebehind from the Javascript dialog? The best solution is to use Ajax. Check out how it is done here: http://encosia.com/using-jquery-to-directly-call-aspnet-ajax-page-methods/

Remember you'll be calling a static method in your codebehind so not all data in the page will be available. You can though for example access the Session object through the HttpCurrent object.

Good luck.

after checking the dependecy set the btnDeleteItem.OnClick as btnDeleteItem.OnClick +=btnDeleteItemConfirmed_Click and set btnDeleteItem.OnClientClick OnClientClick="return confirm('Are you sure you want to delete this item?');"

May This Helps You

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!