以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- Public member 'Replace' on type 'Long' not found 字符串替代操作报错 啥原因啊 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=149353) |
-- 作者:guosheng -- 发布时间:2020/4/29 15:37:00 -- Public member 'Replace' on type 'Long' not found 字符串替代操作报错 啥原因啊 Dim nms As String = e.Form.Controls("TextBox6").value messagebox.show(nms) Dim nms1 As String = e.Form.Controls("TextBox6").value.Replace(",","-") \'报错 messagebox.show(nms1 ) Public member \'Replace\' on type \'Long\' not found Dim nms1 As String = nms.Replace(",","-") \'没问题 messagebox.show(nms1 )
|
-- 作者:有点蓝 -- 发布时间:2020/4/29 15:43:00 -- e.Form.Controls("TextBox6").text.Replace(",","-") 如果是绑定的,value跟随绑定的列的类型,如果绑定的列是整数型,value也是整数型,整数是没有Replace用法的
|