• TextBox根据换行符分离


    TextBox 是允许多行的

                        <asp:TextBox ID="txtEmployeeID" TextMode="MultiLine" Rows="8" runat="server"></asp:TextBox>           

    由于查询的时候,需要把TextBox多行的给分屯出来进行查询,分离方法如下,根据\r来分离

     string[] strArr1 = txtEmployeeID.Text.Split('\r');
                    if (strArr1 != null)
                    {
                        //Response.Write(strArr1.Length.ToString());
                        foreach (string s1 in strArr1)
                        {
                            if (string.IsNullOrEmpty(s1.Trim())) continue;
                   Response.Write(s1);

    } }
  • 相关阅读:
    STL容器[26]
    SHELL[01]
    SHELL[04]
    SHELL[02]I/O重定向
    STL容器[39]
    stl.set用法总结
    STL容器[33]
    STL容器[29]
    hdu acm1071
    hdu acm 2673
  • 原文地址:https://www.cnblogs.com/gzh4455/p/2490190.html
Copyright © 2020-2023  润新知