C#如何处理textarea中的换行符
我做一个投票系统
用textarea,
换行则写一个选项
提交时如果区分开
------解决方案--------------------------------------------------------
string[ ] a = TextBox2.Text.Split( '\n ' );
foreach ( string var in a )
{
Response.Write( var + "; " );
}
------解决方案--------------------------------------------------------
s = s.Replace( "\r\n ", " <br /> ");
------解决方案--------------------------------------------------------
string ts = TextArea1.InnerText;
string[] strs = ts.Split(new string[] { "\r\n " }, StringSplitOptions.RemoveEmptyEntries);
------解决方案--------------------------------------------------------
up