从下拉列表中选择项目时,Ajax弹出窗口关闭 [英] Ajax popup is closed when item is selected from dropdown

查看:128
本文介绍了从下拉列表中选择项目时,Ajax弹出窗口关闭的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Div作为弹出窗口.问题是:
我使用了一个div作为弹出窗口,其中包含一些texbox,下拉列表和按钮.
每次在下拉列表中选择一个项目时,div就会消失.
如何阻止div关闭?

每次div消失时都会选择下拉项,这就是为什么我再次打开div的原因

 字符串脚本= " ;
ScriptManager.RegisterStartupScript(Page,Page.GetType(),Guid.NewGuid().ToString(),script, false ); 


Div as a popup. problem is :
I have a used a div as pop up that contains some texboxes, dropdownlists and button.
each time an item in a dropdown list is selected a div dissapears.
how to stop the div from being closed?

The dropdown item is get selected each time the div dissapears that''s why i opened the div again by

string script = "<script language='javascript'>fnOpenDiv();</script>";
ScriptManager.RegisterStartupScript(Page, Page.GetType(), Guid.NewGuid().ToString(), script, false);

解决方案

if u had used multiple updatePanels and nested updatepanel thus setting the UpdateMode="Conditional" to outer UpdatePanel the problem will be solved. and no need to open the div again. No need to open the div again in SelectedIndexChange event.


这篇关于从下拉列表中选择项目时,Ajax弹出窗口关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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