我觉得这样写才对:
bool IPostBackDataHandler.LoadPostData(string postDataKey, System.Collections.Specialized.NameValueCollection postCollection)
{
string presentValue = this.Text;
string postedValue = postCollection[this.UniqueID];
this.Text = postedValue;
if(!presentValue.Equals(postedValue))
{
return true;
}
return false;
}
书上都这么写也对,为什么?bool IPostBackDataHandler.LoadPostData(string postDataKey, System.Collections.Specialized.NameValueCollection postCollection)
{
string presentValue = this.Text;
string postedValue = postCollection[this.UniqueID];
if(!presentValue.Equals(postedValue))
{
this.Text = postedValue;
return true;
}
return false;
}
解决方案 »
- 关于:删除提示框
- 【ASP.NET】急急急。。。如何取得repeater中的控件
- 母版页问题
- .net2.0对WORD的操作运行不动,是什么原因啊.又没报错.请各位大侠指点...
- TextBox的onclick事件,如何加cs中定义的方法;
- 急:关于IEWebControls中的TreeView控件
- 求教索引专家: 终于找到查询缓慢的原因了? 但不知该如何解决!
- ◆勇敢者论坛完整源代码1.04(asp.net c# SQL 2000)发布!◆
- asp.net怎样使用事务,请高手。。。
- 请教:出现 <%@ Application Codebehind="Global.asax.cs" Inherits="WebApplication1.Global" %>错误如何解决?
- 晕了,用户控件绑定问题,高分求助
- 请教一个写法
if(!presentValue.Equals(postedValue))//如果他们不相等
{
this.Text = postedValue;//才赋值,否则不用赋值了。
return true;
}因为:
string presentValue = this.Text;