u could try:
Server.urlEncode(yourstring)
Server.urlEncode(yourstring)
解决方案 »
- windows ce(6.0) 里怎么实现打印(C#语言)
- 关于如何取得IBatisNet的sql语句的问题,急急急!!!
- .net中 如何给Select型存储过程赋变量值后如何调用
- 使用 DataAccessApplicationBlock好? 还是使用 Enterprise Library 中的数据库访问助手类好??
- 不行了,TreeView控件动态加载数据库的问题!只差一点点了,实在没分了
- 参数传递,乱码。。。求助!在线等!
- 入门者求助:装好iis 装好了.Net Framework 为何还提示找不到文件啊
- 安全性异常 System.Security.SecurityException
- C#: 控件DataList的个数不确定,如何在aspx里面实现?
- 用textbox(多行)留言 如何取得HTML代码? 内详 问题 谢谢帮忙!
- 思归大侠,各位壮士,快来助我,我已功力耗尽了*********************************
- ::::::如何不通过存储过程获取identity值?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>TestPost</title>
</HEAD>
<body>
<form id="Form1" method="post" runat="server"><asp:TextBox id=TextBox1 runat="server" TextMode="MultiLine" Rows="5" Columns="20"></asp:TextBox><asp:Button id=btnSubmit runat="server" Text="Submit"></asp:Button>
</form>
</body>
</HTML>2. TestPost.aspx.csusing System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.IO;namespace WebApplication3
{
/// <summary>
/// Summary description for TestPost.
/// </summary>
public class TestPost : System.Web.UI.Page
{
protected System.Web.UI.WebControls.TextBox TextBox1;
protected System.Web.UI.WebControls.Button btnSubmit;
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
} #region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.btnSubmit.Click += new System.EventHandler(this.btnSubmit_Click);
this.Load += new System.EventHandler(this.Page_Load); }
#endregion private void btnSubmit_Click(object sender, System.EventArgs e)
{
if (!TextBox1.Text.Equals(String.Empty))
{
StreamWriter sw = new StreamWriter(Server.MapPath("Test.txt"));
sw.Write(TextBox1.Text);
sw.Close();
}
}
}
}
3. input:
default:
putchar(node->oper);
return;
}
if (lpri > prior)
putchar('(');
Print(node->left, lpri);
putchar(node->oper);
4. Test.txt:
default:
putchar(node->oper);
return;
}
if (lpri > prior)
putchar('(');
Print(node->left, lpri);
putchar(node->oper);
<system.web>
<pages validateRequest="false" />
</system.web>
</configuration>
我的程序和你给的只有一点差别
sw.Write(TextBox1.Text); //你写的
sw.WriteLine(TextBox1.Text);//我原来的
但是这两个的效果是一样的,就是说,依然是错误随机的出现,提交几次后就会出现我列出的那些改动 至于什么时候会出错根本预测不到,大部分时候是正确的请问哪里可以找到关于asp.net表单提交原理细节的资料,也许是提交的过程中出的错
我没有用response 看,因为我的输入太长了 大约 170 行,返回来也没有格式,找不到如果输入比较少的话,好像是不会出错的。。