string tempStr = newStr.Replace((char)13, (char)0);
        return tempStr.Replace((char)10, (char)0);
这样替换成了两个(char)0,怎样替换成一个(char)0?
我这样出错了:
string as = xxx
as=as.Replace((char)13&(char)10, (char)0);错误提示:
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS1502: The best overloaded method match for 'string.Replace(char, char)' has some invalid arguments

解决方案 »

  1.   

    return newStr.Replace("\r\n", "\0");
      

  2.   

    在IE8里看不到原文件。到了换行的地方就没有了。
    比如,提交内容是:
    123
    456
    网页源代码显示到“456”就中断了!
    (char)13和(char)10该用什么符号连接?
      

  3.   

    替换成""就没事了!之前替换成(char)0也不要紧。不知为什么替换成"\0"就出问题了!
    只是不知道(char)13和(char)10该用什么符号连接~~
    先结贴了~~
      

  4.   

    不懂你的意思。只有字符串才能连接:
    string 有一个构造函数的形式是 char[]。
    你可以用 string breaker = new string(new char[] { char(13), char(10) });另一个问题类似。'\0'是可以的,"\0"会截去后面的字符。
      

  5.   

    asp里面可以chr(13)&chr(10)连接,我大概是弄混了。
    非常感谢!