做回发一个ModalPopup的OkButton被点击ASP.NET AJAX的时候 [英] Make postback when the OkButton in a ModalPopup is clicked in ASP.NET AJAX

查看:340
本文介绍了做回发一个ModalPopup的OkButton被点击ASP.NET AJAX的时候的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我按照<一个例子href=\"http://blogs.vertigosoftware.com/alanl/archive/2006/07/25/Creating%5Fa%5FConfirmation%5FUsing%5Fthe%5FModalPopup%5FExtender.aspx\"相对=nofollow>图集:创建确认使用ModalPopup扩展使回传被点击一个ModalPopup的OkButton时(它使用自带的ASP.NET AJAX Control Toolkit中ModalPopupExtender),但我可以看到,Sys.WebForms.PostBackAction()不再$在ASP.NET AJAX(这个例子是阿特拉斯)p $ psent。当我运行它在Microsoft JScript运行时错误:预期的对象错误消息引发,在我创建了PostBackAction在JavaScript就行了。我怎样才能让这部作品在ASP.NET AJAX,或者,还有另一种方式来做到这一点?谢谢

I follow the example in Atlas: Creating a Confirmation Using the ModalPopup Extender to make a postback when the OkButton in a ModalPopup is clicked (it uses the ModalPopupExtender that comes in ASP.NET Ajax Control Toolkit), but as I can see, the Sys.WebForms.PostBackAction() is no longer present in ASP.NET AJAX (the example is for Atlas). When I run it the "Microsoft JScript runtime error: Object expected" error message raises, in the line in javascript where I create the PostBackAction. How can I make this works in ASP.NET AJAX, or maybe, there's another way to do it? Thanks

推荐答案

你有没有想过使用的 ConfirmButtonExtender ?你得到的模态金光闪闪,通过扩展,你就会有你需要的回传处理。

Have you thought about using the ConfirmButtonExtender? You get the modal "bling" through the extender, and you'll have the PostBack processing you need.

您连线按钮点击事件正常进行处理,但确认扩展将拦截的处理,并允许的事情,如果用户确认操作继续。

You wire the button click event as normal for processing, but the Confirm extender will "intercept" the processing and allow things to continue if the user confirms the action.

这篇关于做回发一个ModalPopup的OkButton被点击ASP.NET AJAX的时候的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆