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,但是等到页面出来的时候还是没值.
用尽了各种方法还是没有解决?贴到园里请教高手.
查看全文
相关阅读:
C++
Qt简介
C语言
C/C++
swagger2 Illegal DefaultValue null for parameter type integer
maven包引入问题ClassNotFoundException: org.elasticsearch.client.Cancellable
mysql自定义排序
使用node创建服务器 运行vue打包的文件
rsync实现服务器之间同步目录文件
将jar包发布到maven的中央仓库细节整理
原文地址:https://www.cnblogs.com/datong/p/1072712.html
最新文章
表空间查看和归档日志清理
How to find Oracle EBS Weblogic Server Admin Port and URL
Forms Process (FRMWEB) Consumes 100% of CPU in Oracle Applications R12 (文档 ID 745711.1)
Templates/Code Combinations
Personalize Oracle Applications Home Page Browser Window Title
MySQL锁表解决方法
PowerDesigner 表格导出为excel
ORACLE EBS常用表及查询语句(最终整理版)
Oracle EBS数据定义移植工具:Xdf(XML Object Description File)
易买网部分总结
热门文章
初始JQuery
JavaScript
Javaoop选择题总结
接口,深入接口,索引器,foreach本质
C#简单工厂
c语言
C语言
关键字static在标准C/C++的作用
C语言
C语言
Copyright © 2011-2022 走看看