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,但是等到页面出来的时候还是没值.
用尽了各种方法还是没有解决?贴到园里请教高手.
查看全文
相关阅读:
IDE有毒
Netbeans 8.2关于PHP的新特性
什么是人格
谁该赋予一款产品灵魂?
自从升级到macOS后,整个人都不好了
公司不是大家庭
性能各个指标分析
Sqlserver2012 alwayson部署攻略
初探Backbone
SQL Server AlwaysOn架构及原理
原文地址:https://www.cnblogs.com/datong/p/1072712.html
最新文章
ggplot2学习
插入排序执行过程
loadRunner手动关联,通过 web_reg_save_param()函数
loadRunner手动关联, web_reg_save_param_regexp()函数正则匹配字符,赋值给变量
urllib2 post请求方式,带cookie,添加请求头
LoadRunner录制登录机票网址,并回放,加断言
linux查看系统状态的命令
loadRunner回访脚本时报Error -27987: Requested image not found [MsgId: MERR-27987]
python递归练习:生成一个n级深度的字典,例如:[1,2,3,4,5,6] 可以生成{1: {2: {3: {4: {6: 5}}}}},写一个函数定义n级
linux监控性能和网络的命令
热门文章
mysql语句的执行过程
应用程序这个名称的一些演化过程
寻找完美的语言
[译]Godot系列教程四
[译]Godot系列教程三
[译]Godot系列教程二
下阶段重点是翻译文档
[译]Godot系列教程一
又一个半成品库 weblog rpc client
未知
Copyright © 2011-2022 走看看