积极答复者
ASP.Net TextBox Special Character missing in code behind

问题
-
Hi all,
I encounterred an issue that a special character "#" input in the textbox, however, in code behind this character "#" is removed automatically in TextBox.Text .
it might be a simple question, but does anyone know why?
- 已编辑 Zhan Jin Yang 2012年3月2日 8:36
答案
-
问题解决了,在基类里面有个函数将特殊字符过滤掉,由于有的页面调用的基类函数并不一致,所以出现了有的页面正常,有的不正常的情况。
谢谢你的回复,dong
- 已标记为答案 Zhan Jin Yang 2012年3月6日 9:54
全部回复
-
Hi,I cannot reproduce your issue——
namespace CSharp { public partial class WebForm1 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { Response.Write(TextBox1.Text); } } }
-
问题解决了,在基类里面有个函数将特殊字符过滤掉,由于有的页面调用的基类函数并不一致,所以出现了有的页面正常,有的不正常的情况。
谢谢你的回复,dong
- 已标记为答案 Zhan Jin Yang 2012年3月6日 9:54