热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

asp.net切换按钮扩展器和模态弹出扩展器碰撞-asp.nettogglebuttonextenderandmodalpopupextendercollision

Iamcurrentlymovingsomeformfieldsonanexistingwebformintoamodalpopupwindowusingtheas

I am currently moving some form fields on an existing webform into a modal popup window using the asp.net toolkit extender. One of the fields uses the toolkit's toggle button extender on a checkbox a works quite well. When I move the checkbox and extender into the modal popup div, the toggle button extender stops working.

我目前正在使用asp.net工具包扩展程序将现有webform上的某些表单字段移动到模态弹出窗口中。其中一个字段在复选框上使用工具包的切换按钮扩展器非常有效。当我将复选框和扩展器移动到模态弹出窗口时,切换按钮扩展器停止工作。

After confirming the problem, I decided to try using a jquery plug-in called checkbox that provides the same function. Again this plugin worked as advertised until I moved it into the modal window div. I had hoped to avoid hand rolling a solution.

确认问题后,我决定尝试使用一个名为checkbox的jquery插件来提供相同的功能。再次,这个插件像广告一样工作,直到我将它移动到模态窗口div。我曾希望避免手动滚动解决方案。

I am guessing that the problem has something to to with css positioning. I would love to hear possible fixes before I build a solution from scratch.

我猜这个问题与css定位有关。在从头开始构建解决方案之前,我很想听听可能的修复。

Edit

编辑

Here is my original approach with toggle button extender:

这是我使用切换按钮扩展器的原始方法:







    

    
        

        
        
        

        

        
        
            
        
    


I have also now tried placing a hidden field and an image and writing jquery click function. This also results in the same issue (stops working inside modal div).I can get code to run by hard coding onclick event attribute. I would love to understand why and if there are any more elegant ways to work around this. I guess I could try a jquery modal popup plugin, but I didn't plan to rewrite this whole page.

我现在也尝试放置隐藏字段和图像并编写jquery点击功能。这也会导致同样的问题(停止在modal div中工作)。我可以通过硬编码onclick事件属性来运行代码。我很想知道为什么以及是否有更优雅的方法来解决这个问题。我想我可以尝试一个jquery模式弹出插件,但我不打算重写整个页面。

1 个解决方案

#1


0  

Take a look at your ModalPopupExtender Attributes. TargetControlID and PopupControlID are the same panel "pnlAddTransaction". The TargetControlID is the control that triggers the control at PopupControlID to display.

看看你的ModalPopupExtender属性。 TargetControlID和PopupControlID是相同的面板“pnlAddTransaction”。 TargetControlID是触发PopupControlID控件显示的控件。


推荐阅读
author-avatar
手机用户2602904645
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有