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,但是等到页面出来的时候还是没值.
用尽了各种方法还是没有解决?贴到园里请教高手.
查看全文
相关阅读:
能帮你找到网页设计灵感的16个网站
Alpha和索引色透明
CSS2.0中最常用的18条技巧
汇编指令CPUID
ewebeditor漏洞解決方法
关于SQL SERVER建立索引需要注意的问题
Apple QuickTime
免杀修改特征码需要掌握的汇编知识
【我翻译的文章】理解和应用F#中的“use”语法
【我翻译的文章】Promesh.NET:一个.NET的MVC Web框架
原文地址:https://www.cnblogs.com/datong/p/1072712.html
最新文章
播放 QuickTime 影片
VB6 獲取CPUID的幾种方法
Linux下程序安装问题
給汽車換色用photoshop和flash的處理方法
使用物件導向技術來建立進階 Web 應用程式
MSN線上客服
使用 Visual Basic IDE 在 ASP 用戶端中偵錯 COM+ 元件時發生錯誤
对症下药教你清除电脑中的木马
Linux目录结构 & Linux分区、挂载点
Delphi7中插入汇编[Assembly]獲取CPUID
热门文章
学习资源
建立合理的索引提高SQL Server的性能
图文并茂:delphi 编写你的com程序
Expression Studio 2.0 简体中文正式版 注册码
如何实现多媒体在线播放的功能
一段有意思的html表格代碼
ewebeditor漏洞利用汇总
VB WMI 对象的示例代码
C#中對WMI 操作
Visual Basic内嵌汇编语言解决方案
Copyright © 2011-2022 走看看