惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

F
Fortinet All Blogs
Attack and Defense Labs
Attack and Defense Labs
V2EX - 技术
V2EX - 技术
O
OpenAI News
S
Secure Thoughts
H
Heimdal Security Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Schneier on Security
Schneier on Security
H
Hacker News: Front Page
S
Security Affairs
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Proofpoint News Feed
The Register - Security
The Register - Security
GbyAI
GbyAI
Cloudbric
Cloudbric
MongoDB | Blog
MongoDB | Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
K
Kaspersky official blog
Forbes - Security
Forbes - Security
Y
Y Combinator Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
Scott Helme
Scott Helme
Hacker News - Newest:
Hacker News - Newest: "LLM"
The Cloudflare Blog
Recorded Future
Recorded Future
人人都是产品经理
人人都是产品经理
Cyberwarzone
Cyberwarzone
C
CERT Recently Published Vulnerability Notes
Webroot Blog
Webroot Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
L
LangChain Blog
T
Tor Project blog
Microsoft Azure Blog
Microsoft Azure Blog
博客园_首页
Hacker News: Ask HN
Hacker News: Ask HN
Blog — PlanetScale
Blog — PlanetScale
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
B
Blog RSS Feed
N
News and Events Feed by Topic
阮一峰的网络日志
阮一峰的网络日志
I
Intezer
V
V2EX
T
Tailwind CSS Blog
SecWiki News
SecWiki News
NISL@THU
NISL@THU
C
Check Point Blog

博客园 - 鱿鱼

关于在VS2005环境下无法从源视图切换到设计视图的解决方案(转) - 鱿鱼 - 博客园 DotNet2005快捷键 什么是托管 LINQ,语言级集成查询(Language INtegrated Query) ORM(Object Relational Mapping) Step by Step 创建一个简单的Silverlight应用程序(转自微软学生中心) SiliverLight的安装配置 预览大尺寸图片的解决方案 uploadfile和Image实现图片预览 - 鱿鱼 - 博客园 datalist分页 - 鱿鱼 - 博客园 解决datalist中radiobutton单选的问题 .NET委托:一个C#睡前故事 对.NET中三层结构的解释 日期格式的正则表达式 关于判断sql查询记录集为空的问题 无刷新聊天室(asp.net1.1) 无刷新聊天室简易版(asp.net2.0) asp.net2.0更改login控件对密码安全性的要求(转) 一个上传文件的免费空间(转)
关于ModalPopup控件不能调用CS事件代码的问题
鱿鱼 · 2007-06-16 · via 博客园 - 鱿鱼

昨天搞ModalPopup,开始是单击事件调用JavaScript事件代码,没问题
后来想要实现登录效果调用后台CS事件代码
发现根本调用不到后台的CS事件

解决前的ModalPopup属性:

<ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender" runat="server" 
            TargetControlID
="LinkButton1"
            PopupControlID
="Panel1" 
            BackgroundCssClass
="modalBackground" 
            OkControlID
="OkButton"
            OnOkScript
="onOk()" 
            CancelControlID
="CancelButton" 
            DropShadow
="true"
            PopupDragHandleControlID
="Panel3" />

解决之后的ModalPopup属性:

<ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="LinkButton1" PopupControlID="Panel1" BackgroundCssClass="modalBackground" DropShadow=true PopupDragHandleControlID="Panel3">
                
</ajaxToolkit:ModalPopupExtender>

问题:如果是调用javascript事件代码,就要用到OnOkScript属性
            想击之后调用后台CS事件代码则不用"OkControlID","OnOkScript","CancelControlID"属性
即可解决
不过这样调用后台事件之后实现的效果不太如意,因为popup对话框消失以后会刷新整页
要解决这个问题就要结合使用updatepanel控件
把popup里面的按钮放在updatepanel里面,再把页面里需要刷新的部分放到updatepanel里面
这样就可以实现局部刷新的登录效果