[转]Dropdownlist doesn't postback after Page_ClientValidate()
本文转自:http://stackoverflow.com/questions/2083929/dropdownlist-doesnt-postback-after-page-clientvalidate
|
Update: I have just found the solution. The following function works (remove the else part):
But I am wondering why it doesn't work when I add the else part. Question: I want to have a confirm dialog after user fills in all the data in the form. I set onclientclick="return confirmSubmit()" in the submit button.
If Page_ClientValidate("Group1") returns false, the dropdownlist doesn't cause postback after I first select the item, and the postback only occurs when I select the dropdownlist second time. What's the problem? |
|||||||||
|
|
After Page_ClientValidate is called, the variable Page_BlockSubmit gets set to true, which blocks the autopost back. Page_BlockSubmit was getting reset to false on the second click, for what reasons I still don't fully understand. I'm looking more into this, but I have a solution and I'm under the gun so I'm rolling with it.... Just add below code in the code block which executes if Page is not valid.
e.g.
|
[转]Dropdownlist doesn't postback after Page_ClientValidate()的更多相关文章
- 解决dropdownlist postback 在 iphone UIwebview 失效的问题
原因: IPhone UIWebView 的 用户代理 User Agent 在ASP.NET 4.0环境下是不识别的:所以ASP.NET提供了一个默认的,低级的不包括javascript的页面版本 ...
- "不能在 DropDownList 中选择多个项。"其解决办法及补充
探讨C#.NET下DropDownList的一个有趣的bug及其解决办法 摘要: 本文就C#.Net 环境下Web开发中经常使用的DropDownList控件的SelectedIndex属性进行了详细 ...
- IsPostBack and DropdownList.
Encounted the issue accident when helping my classmate dealing with his homework assignment,it turns ...
- Asp.net中Postback及Callback
我们知道,在默认的情况下,当我们点击Asp.net Page中的一个服务器Button时(默认其实是Submit Form),会导致Page被Recreated,这个过程我们称之为Postback,它 ...
- jQuery UI Autocomplete Combobox 配 ASP.NET DropDownList
0.引言 1.起因 一开始使用Autocomplete做了一个自动补全的文本框,如上图.后来因业务需要希望能在这个文本框的边上做个下拉列表按钮,一按就展开所有支持 ...
- Understanding The Complete Story of Postback in ASP.NET
https://docs.microsoft.com/zh-cn/dotnet/api/system.web.ui.page.ispostback?view=netframework-4.7 http ...
- Asp.Net 将枚举类型(enum)绑定到ListControl(DropDownList)控件
在开发过程中一些状态的表示使用到枚举类型,那么如何将枚举类型直接绑定到ListControl(DropDownList)是本次的主题,废话不多说了,直接代码: 首先看工具类代码: /// <su ...
- DropDownList 下拉框选择改变,促发事件和防全局刷新(记录)
代码: <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:Script ...
- DropDownList实现可输入可选择
1.js版本 <div style="z-index: 0; visibility: visible; clip: rect(0px 105px 80px 85px); positio ...
随机推荐
- AES .net 、JS 相互加密解密
/// <summary> /// AES加密 /// </summary> public class AES { /// <summary> /// 加密 /// ...
- Slick – 这是你需要的最后一款 jQuery 传送带插件
slick 是一款完全响应式的 jQuery 传送带插件,能够根据容器自动适应宽度.在现代浏览器中会使用 CSS3 来实现特殊效果,可以使用扩展方法对项目进行添加.删除和过滤.这是你需要的最后一款 j ...
- 【Leafletjs】2.添加marker到地图
本人建了一个Leaflet交流群:Leaflet&WebGIS 331437754 接着上篇我们在地图中添加一个marker,非常简单只需添加如下代码即可: var marker = L.m ...
- Sharepoint学习笔记—习题系列--70-576习题解析 -(Q63-Q65)
Question 63You are designing a SharePoint 2010 implementation that will be used by a company with a ...
- CAShaperLayer的应用
关于CAShapeLayer的一些实用案例和技巧 实现遮罩 音量大小动态改变的控件 圆形进度条 iOS 利用CAShapeLayer的FillRule属性生成一个空心遮罩的layer fillrule ...
- android加固系列—5.加固前先学会破解,hook(钩子)jni层系统api
[版权所有,转载请注明出处.出处:http://www.cnblogs.com/joey-hua/p/5138585.html] crackme项目jni的关键代码(项目地址见文章底部),获取当前程序 ...
- UITableView
知识点: 1)UITableView 2)UITableViewCell ====================================================== 一.UITabl ...
- android 进程间通信数据(一)------parcel的起源
关于parcel,我们先来讲讲它的“父辈” Serialize. Serialize 是java提供的一套序列化机制.但是为什么要序列化,怎么序列化,序列化是怎么做到的,我们将在本文探讨下. 一:ja ...
- WPF学习之路(十一)布局
布局 Canvas 基本面板,传统布局方式,支持与设备无关的坐标定位元素 <Border BorderThickness="> <Canvas> <Button ...
- WPF学习之路(九)导航和页面(续)
生命周期 如果Page1成功导航到Page2,首先会触发NavigationService的Navigating事件,标识导航开始.随后创建Page2对象,并且触发NavigationProgress ...