主题:请教一个换行问题
protected void Button1_Click(object sender, EventArgs e)
{
Application.Lock();
Application["show"] =TextBox1.Text +"<br>" + Application["show"];
Application.UnLock();
TextBox1.Text = "";
}
public partial class show : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Application["show"] == null)
{
ShowMessage.Text = "hello";
Application.Lock();
Application["show"] = "hello";
Application.UnLock();
}
ShowMessage.Text = Application["show"].ToString();
}
}
代码如上
如果输入两行字如“很多”和“更好”,显示的是“很多<br>更好”,这不是我想要的结果,怎样让他换行成:
“很多”
“更好”
{
Application.Lock();
Application["show"] =TextBox1.Text +"<br>" + Application["show"];
Application.UnLock();
TextBox1.Text = "";
}
public partial class show : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Application["show"] == null)
{
ShowMessage.Text = "hello";
Application.Lock();
Application["show"] = "hello";
Application.UnLock();
}
ShowMessage.Text = Application["show"].ToString();
}
}
代码如上
如果输入两行字如“很多”和“更好”,显示的是“很多<br>更好”,这不是我想要的结果,怎样让他换行成:
“很多”
“更好”