asp如何截取字符串? - Web 开发 / ASP
比如 复选框获取出来的值是 12,13,14
我要这样截取才能使 id=12 || id =13 || id=14了 ?
VBScript code:
s = "12,13,14"
a = Split(s,",")
s=""
For i = 0 To UBound(a)
s = s & "id=" & a(i) & "||"
Next
s=Left(s,Len(s)-2)
ASP复选框选出来的值,我记得默认排列是:
值A, 值B, 值C, ....
每个值都是用一个英文逗号和一个空格来区分的:,
所以你可以用split函数把这些值用, 分开然后装到数组里面然后一个一个提取出来
好的 谢谢
初学asp...
相关问答:
有一个类
class adc
{
dim a,b,c
}
如何在另外一个类中取得类成员及成员个数
class getmenber
{
dim menbers()
function getmenbers(resclass)
'res为一未知类
'getmenber ......
asp.net批量上传图片最好有源码,在线等!!!!!!!
源码很长的。
参考
C# code:
HttpFileCollection files = HttpContext.Current.Request.Files;
if (files.Count <= 1)
{
......
就是一个按钮,点击之后打开对话框,然后选取图片。就这样上传。。
怎么实现。在网上搜到那么多的代码,全是很多的那种,不知道,看不下去。
所以在这里想请大哥大姐帮帮忙。
使用自带的fileupload控件可以实现 ......
C# code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Runtime.InteropServices;
nam ......
O O O O O O
|.......| |........| |.......|
| | |
O O ......