.net常用函数

来源:互联网 发布:聪明的投资者 知乎 编辑:程序博客网 时间:2024/06/05 10:48

string[] names = Request.Form.GetValues("names[]");//名称数组,.net获取form数组

for (int i = 0; i < names.Length; i++)
{        }


Convert.ToInt32 转换为数字

\n     .net下的html代码中的换行符

ss = Server.UrlDecode(ss);  //URL解码

Server.UrlEncode("美女")//URL编码
        Response.Write(ss);


 string[] sArray = objst.Split('n');  //按单字符分隔


                    string[] sArray=System.Text.RegularExpressions.Regex.Split(objst, @"background-image: none"); //按多字符分隔
                     foreach (string i in sArray)
                         Console.WriteLine(i.ToString());
                     Console.ReadKey();

0 0
原创粉丝点击