request.form("shuliang"&h)的类型为什么是istringlist类型?
时间:2011-06-27
来源:互联网
红色检测的结果:typename(request.Form("shuliang"&h))&"<br/>")为IStringlist,
我还检测了下值,其中值只有一个,是h=1时对应的值,是我预期的。
我查了资料Istringlist是一个对象,不能添加值的。
所以我想问一下为什么request.from("shuliang"&h)会是Istringlist对象呢?如何才能添加成功了?谢谢帮忙!
VBScript code
Set RBJZycl = Server.CreateObject("ADODB.Recordset") SQLRBJZycl = "Select * From jzycl where [name] is null" RBJZycl.Open SQLRBJZycl,connstr,1,3 RBJZycl.AddNew for h=1 to 6 if request.Form("clname"&h)<>"" then RBJZycl("name")=request.Form("clname"&h) RBJZycl("jixing")=request.Form("jixing"&h) [color=#FF0000]response.Write(typename(request.Form("shuliang"&h))&"<br/>") response.Write(h&"<br/>"&request.Form("shuliang"&h)&"<br/>") response.End[/color] RBJZycl("shuliang")=FormatNumber(request.Form("shuliang"&h)) RBJZycl("riqi")=request.Form("riqi"&h) RBJZycl.update end if next RBJZycl.close set RBJZycl=nothing
作者: feilong5xian 发布时间: 2011-06-27
response.Write(typename(request.Form("shuliang"&h))&"<br/>")
response.Write(h&"<br/>"&request.Form("shuliang"&h)&"<br/>")
response.End
作者: feilong5xian 发布时间: 2011-06-27
For Each s In request.Form("shuliang"&h))
str = str + s+","
Next
循环看看
作者: aspwebchh 发布时间: 2011-06-27
JScript code
If TypeName(Request.Form("shuliang"&h)) = "IStringList" Then Set shuliang=Request.Form("shuliang"&h) Else shuliang=Request.Form("shuliang"&h) End If
作者: showbo 发布时间: 2011-06-27
作者: showbo 发布时间: 2011-06-27
dim str
For Each s In request.Form("shuliang"&h))
str = str + s+","
Next
循环看看
我把这个加入到RBJZycl("jixing")=request.Form("jixing"&h)这个后面。
提示语句未结束。
当Request.Form("industrytype")存在多个值时,它就不是String了,而是一种叫做IStringList的对象,类似于集合,这时要用Set赋值。所以在赋值之前要判断Request.Form("industrytype")的子类型
这个我也在http://hi.baidu.com/dongfangjunzi/blog/item/27ca85caa331988cc81768bc.html看到了,但是联系不到如何解决问题。
作者: feilong5xian 发布时间: 2011-06-27
最后在RBJZycl("jixing")=request.Form("jixing"&h)
后面加入一下代码就可以了。
VBScript code
If TypeName(Request.Form("shuliang"&h)) = "IStringList" Then Set industrytype=Request.Form("shuliang"&h) shuliang=industrytype(1) Else shuliang=Request.Form("shuliang"&h) End If if isNumeric(trim(shuliang))=true then TJshuliang=shuliang end if
作者: feilong5xian 发布时间: 2011-06-27
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28