如何在模式弹出控件中使用dropdownlist选择更改的事件时避免回发 [英] how to avoid postback while using dropdownlist selected changed event in modal popup control

查看:112
本文介绍了如何在模式弹出控件中使用dropdownlist选择更改的事件时避免回发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
我想避免在模式弹出控件中引发选定的已更改事件时发生闪烁.

hello,
i want to avoid flickering while selected changed event has been raised in modal popup control

推荐答案

似乎DropDownList不在 UpdatePanel 中.如果不进行完整的回发,就无法获得该值.
It seems the DropDownList is not in an UpdatePanel. It had no way to get the value without doing a full postback.


在onSelectedIndexChanged
上使用它 onchange ="return false"
use this on onSelectedIndexChanged
onchange="return false"


只需在page_load事件中编写以下代码

just write below code in page_load event

page_load()
{
if(!ispostback)
{
your code
}
}




您知道吗,您需要在页面加载事件中编写此代码
每次您选择索引更改事件引发时都会引发页面加载事件




do u know y u need to write this code in page load event
every time page load event is is raise when u will selected index changed event raised


这篇关于如何在模式弹出控件中使用dropdownlist选择更改的事件时避免回发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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