UpdatePanel里的Repeater和DropDownList
在updatepanel里使用dropdownlist的AutoPostBack,正常情况下都可以局部刷新。
但是,如果updatepanel下是Repeater,repeater里绑定dropdownlist时,如果设置dropdownlist的AutoPostBack=true,那么会引起整个页面的post。
解决方案:
1.去掉dropdownlist的AutoPostBack=true;
2.给dropdownlist加一个OnChange事件,OnSelectedIndexChanged事件依旧。
OnChange="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(this.name, '', true, '', '', false, true))"
完美解决。
UpdatePanel里的Repeater和DropDownList的更多相关文章
- ASP.NET Repeater 绑定 DropDownList Calendar 选择日期
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.We ...
- ASPX的Timer位置没放正确,导致整页刷新,而不是UpdatePanel里的内容刷新。
提示:Timer应该放在UpdatePanel的ContentTemplate标签里,才行.放在外面的话,会导致整页刷新.
- repeater绑定dropdownlist,jquery+ajax页面无刷新,修改dropdownlist默认值
html代码: <td> <asp:HiddenField ID="hiddenchuli" Value='< ...
- ASP.Net WebForm温故知新学习笔记:二、ViewState与UpdatePanel探秘
开篇:经历了上一篇<aspx与服务器控件探秘>后,我们了解了aspx和服务器控件背后的故事.这篇我们开始走进WebForm状态保持的一大法宝—ViewState,对其刨根究底一下.然后,再 ...
- 关于Repeater嵌套绑定的问题
前台代码: <div id="firstpane" class="menu_list"> <asp:Repeat ...
- ASP.NET中使用DropDownList实现无刷新二级联动详细过程
Demo.sql create table Car( [id] int identity, ) not null, ) not null ) go insert into Car ([brand],[ ...
- 转:Repeater嵌套绑定Repeater以及内层调用外层数据
<table border=" style="margin-bottom: 5px" width="100%"> <asp:Repe ...
- asp.net DropDownList无刷新ajax二级联动实现详细过程
只适合新手制作DropDownList无刷新ajax二级联动效果: 数据库实现,添加两表如图:表1,pingpai,表2,type,具体数据库实现看自己的理解: //页面主要代码: <asp:S ...
- repeater灵活运用、repeater的commmand用法、如何不用repeater展示数据
实体类: using System; using System.Collections.Generic; using System.Linq; using System.Web; /// <su ...
随机推荐
- ComboboxColumn取值——Winform中DataGridView中某一列使用下拉框
ComboboxColumn的用法网上很多,绑定数据源都很简单,这里我遇到的是.不绑定数据源,即所有comobox的绑定都是固定的几个数据: 可以看到没有绑定任何数据源, ,在后台cs中取到下拉框的值 ...
- unity平台的预处理
unity平台的预处理 在开发中,特别是unity的跨平台中,我们经常会在各个平台游走,如安卓版,苹果版,PC版.......在此不同的平台上,有可能我们需要做不同的操作.然而我们就可以用un ...
- 使用automake等命令自动生成Makefile文件 (转载)
使用automake等命令自动生成Makefile文件 Linux下编程时,为了方便编译,往往使用Makefile文件自动完成编译,但是Makefile文件本身的书写十分复杂,规则很多.好在Lin ...
- 编写我的第一个CGI代码——python学习
在编程学习网站学习Python语言,学习到cgi编程章节遇到了一些小问题,课程介绍的为linux环境的Apache配置方法,具体如下: [linux环境配置方法:] 在进行CGI编程前,确保您的Web ...
- asp.net登录时验证码的制作与验证
1.新建一个页面,ImageCode.aspx 2.在Page_Load中添加如下代码 string tmp = RndNum(4); HttpCookie a = new HttpCookie(&q ...
- the usage of map.put
这个不用要的那么详细,对于应用来说,比如举个例子: Map map = new HashMap();map.put("key","value");这样就存入了一 ...
- PE文件学习系列二 DOS头分析
合肥程序员群:49313181. 合肥实名程序员群 :128131462 (不愿透露姓名和信息者勿加入)Q Q:408365330 E-Mail:egojit@qq.com PE文件结 ...
- php学习函数
1defined和define区别 2.dirname(__FILE__) 3.set_include_path 4.get_include_path 5.realpath() 6.require_p ...
- Oracle通过一个Value值查询数据库
---恢复内容开始--- 大家在想看看数据库中有哪些数据表中,哪些字段中有“helloworld” 这个字符串,现在数据库所有的表,视图都不能直接提供,所有必须通过循环去访问所有的数据表,所有的字段列 ...
- Android开发--apk的生成
0.前言 此方法为eclipse中生成apk的方法!!!! 1.生成ketstore 在命令提示符中找到java的jdk路径,例如: D:\study software\Java\jdk1.8.0_2 ...