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,但是等到页面出来的时候还是没值.
用尽了各种方法还是没有解决?贴到园里请教高手.
查看全文
相关阅读:
310. Minimum Height Trees -- 找出无向图中以哪些节点为根,树的深度最小
297. Serialize and Deserialize Binary Tree *HARD*
235.236. Lowest Common Ancestor of a Binary (Search) Tree -- 最近公共祖先
222. Count Complete Tree Nodes -- 求完全二叉树节点个数
208. Implement Trie (Prefix Tree) -- 键树
excel函数累加求和与累计百分比应用
js去除空格
js获取标签下标
js中对String去空格
css的三种使用方式:行内样式,内嵌样式,外部引用样式
原文地址:https://www.cnblogs.com/datong/p/1072712.html
最新文章
解决mysql报错Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock
Host is not allowed to connect to this MySQL server解决方法
Linux下基于RPM BUNDLE包安装MySQL
卸载和安装 MySQL RPM Bundle
Putty文件夹蓝色太暗问题
php 自带过滤和转义函数
PSR
yii2 basic VER
navicat data modeler的使用以及数据库设计的流程
composer
热门文章
百度搜索小技巧
关于存储—块,文件,对象
SDK,API,DLL名词解释
JSON
PHP中常见错误
python 参数 *
118. 119. Pascal's Triangle -- 杨辉三角形
115. Distinct Subsequences *HARD* -- 字符串不连续匹配
html中用变量作为django字典的键值
331. Verify Preorder Serialization of a Binary Tree -- 判断是否为合法的先序序列
Copyright © 2011-2022 走看看