停止刷新vb.net中的页面 [英] Stop refreshing page in vb.net

查看:436
本文介绍了停止刷新vb.net中的页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个其中有一个DropDownList的表单.
当我从DropDownList中选择一项时,整个页面都会刷新.

我希望它停止刷新,该怎么办?

感谢

Hi,

I have a form in which there is a DropDownList.
When I select an item from the DropDownList the whole page gets refreshed.

I want it to stop refreshing, how can I do that?

Thanks

推荐答案

检查列表的"AutoPostBack"属性,它将被设置为True.这意味着它将在每次单击事件时(选择时)自动回发到服务器.

只需将其设置为False,它将停止此行为
Check the ''AutoPostBack'' property of the list, it will be set to True. This means it will automatically post back to the server on every click event (when you select something)

Just set it to False and it will stop this behaviour


您必须在后面检查代码.两者之间必须有一行,在Page_load处调用,这将dropdownlist的Autopostback属性设置为true.删除该特定的行,它将正常工作.

阿努拉格(Anurag)
You must check your code behind then. There must be a line in between, called at Page_load which is setting Autopostback property of dropdownlist to true. Remove that particular line and it will get on working fine.

Anurag


我也是这么做的,但同样的问题还在继续...
i did that too but same problem continue...


这篇关于停止刷新vb.net中的页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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