主要用了C#中的Split函数
string str = "注意,安全,事情,大概 ,有时间,呵呵";
int k = str.LastIndexOf(",", 0,0);
Label1.Text = k.ToString();
char [] a=new char[4];
a[0]=',';
a[1]=',';
a[2]=' ';
string[] s = new string[99];
s=str.Split(a, 50);
string test;
foreach (string aaa in s)
...{
test=aaa.Trim();
if (test.Length == 0)//防止旁边的空格输入到一个记录
continue;
Response.Write(test+"|||</br>");
}
int k = str.LastIndexOf(",", 0,0);
Label1.Text = k.ToString();
char [] a=new char[4];
a[0]=',';
a[1]=',';
a[2]=' ';
string[] s = new string[99];
s=str.Split(a, 50);
string test;
foreach (string aaa in s)
...{
test=aaa.Trim();
if (test.Length == 0)//防止旁边的空格输入到一个记录
continue;
Response.Write(test+"|||</br>");
}