zoukankan
html css js c++ java
奇怪的问题?
用DetailsView 编辑赋值时,添加模式的时候页面可以得到值,当在编辑模式的时候就是不能得到值.
string
m_strSum
=
SoF.Common.GatewayFactory.GetDefault().FromCustomSql(
"
SELECT COUNT(*) AS EXERCISESUM FROM D_Job_ArithmeticExercise
"
).ToDataSet().Tables[
0
].Rows[
0
][
"
EXERCISESUM
"
].ToString();
string
m_strNormal
=
Gateway.Count
<
ArithmeticExercise
>
(ArithmeticExercise._.FSort
==
"
0
"
).ToString();
string
m_strArtifice
=
Gateway.Count
<
ArithmeticExercise
>
(ArithmeticExercise._.FSort
==
"
1
"
).ToString();
DvArithmeticExamPaper.DefaultMode
=
string
.IsNullOrEmpty(FGuid)
==
true
?
DetailsViewMode.Insert : DetailsViewMode.Edit;
this
.Title
=
(DvArithmeticExamPaper.DefaultMode
==
DetailsViewMode.Edit)
?
"
修改算术题
"
:
"
添加算术题
"
;
labelSum.Text
=
m_strSum;
labelNormal.Text
=
m_strNormal;
labelArtifice.Text
=
m_strArtifice;
//
编辑模式时三个Label得不到值.
<
EditItemTemplate
>
<
asp:TextBox ID
=
"
txtFExerciseAmount
"
CssClass
=
"
NecessaryCss
"
runat
=
"
server
"
Text
=
'
<%# Bind("FExerciseAmount") %>
'
MaxLength
=
"
3
"
onkeyup
=
"
value=value.replace(/[^\d]/g,'')
"
value
=
'
只能输入数字
'
onfocus
=
"
if (value =='只能输入数字'){value =''}
"
onblur
=
"
return CountValidate();
"
></
asp:TextBox
>
<
asp:RegularExpressionValidator ID
=
"
RegularExpressionValidator1
"
runat
=
"
server
"
ErrorMessage
=
"
试题量必须为整数!
"
Display
=
"
Dynamic
"
ControlToValidate
=
"
txtFExerciseAmount
"
ValidationExpression
=
"
[1-9]\d*
"
></
asp:RegularExpressionValidator
>
题目总数:
<
asp:Label runat
=
"
server
"
id
=
"
labelSum
"
></
asp:Label
>
(基础题:
<
asp:Label runat
=
"
server
"
id
=
"
labelNormal
"
></
asp:Label
>&
nbsp;
&
nbsp;
&
nbsp;技巧题:
<
asp:Label runat
=
"
server
"
id
=
"
labelArtifice
"
></
asp:Label
>
)
</
EditItemTemplate
>
断点调试的时候值都可以赋给三个Label,但是等到页面出来的时候还是没值.
用尽了各种方法还是没有解决?贴到园里请教高手.
查看全文
相关阅读:
笨办法41学会说面向对象【我有新书啦!!!
pip安装及使用
Office相关
python各种学习链接
3000问
python2代码批量转python3
啊——回来了_(:з」∠)_
停更!
win10 adb(Android Debug Bridge)导出日志
docker镜像管理基础操作
原文地址:https://www.cnblogs.com/datong/p/1072712.html
最新文章
在类库或winform项目中打开另一个winform项目的窗体
正则表达式验证(转载)
2013-7-18
Hive 默认分隔符
Hive 配置项详解
回车与换行的区别:CRLF、CR、LF
Phoenix 使用教程
Hive 安装和配置
HBase HA 集群环境搭建
Yarn 集群环境 HA 搭建
热门文章
MySQL 查询操作
ZooKeeper IDEA 可视化管理插件安装
笔试题(二)
笔试基础
java基础
读写分离如何实现
简单搭建
Netty
并发编程71道
redis4.0之RDB-AOF混合持久化
Copyright © 2011-2022 走看看