ASP.NET回发问题 [英] Problem with ASP.NET Postback

查看:64
本文介绍了ASP.NET回发问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是ASP.NET的新手,所以首先我想为这个愚蠢的问题道歉.

我的问题是Web App中的DropDownList.在一个页面中,当我尝试从下拉列表中选择任何一项已填充了DropDownList.Load()事件中从数据库检索到的数据时,该页面会自动回发到服务器并初始化页面中的所有内容不要从列表中选择任何项目.

注意:DropDownList已启用AutoPostBack.

I am new to ASP.NET, so First I would like to apologise for silly question.

My problem is with DropDownList in Web App. In a page, when I try to select any item from the drop down list that has been populated with data retrieved from database on DropDownList.Load() event, the page automatically post backs to server and initialize everything in the page, so I can not select any item from the list.

Note: DropDownList is AutoPostBack enabled.

推荐答案

http://doitdotnet.wordpress.com/2011/12/16/using-ispostback-property-asp-net-to-avaoid-refilling-of-page-contents/[^]

Above link explains the usage of IsPostBack property with a nice sample program check this. It will solve your problem Jyoti


这篇关于ASP.NET回发问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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