*.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="char13.aspx.cs" Inherits="Test_char13" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server" Rows="10" TextMode="MultiLine" style="width:500px;"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_click" />
<br />
<asp:TextBox ID="TextBox2" runat="server" Rows="10" TextMode="MultiLine" style="width:500px;"></asp:TextBox>
<asp:TextBox ID="TextBox3" runat="server" Rows="10" TextMode="MultiLine" style="width:500px;"></asp:TextBox>
<asp:TextBox ID="TextBox4" runat="server" Rows="10" TextMode="MultiLine" style="width:500px;"></asp:TextBox>
</div>
</form>
</body>
</html>
*.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class Test_char13 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_click(object sender, EventArgs e)
{
if (this.TextBox1.Text.IndexOf("\r") != -1)
{
string x = this.TextBox1.Text.ToString();
 
|