给TextBox加上OnBlur 的服务端事件就可以了!服务端就会自动生成根onclick一样事件 this.MyTextBox.OnBlur += new System.EventHandler(this.MyTextBox_OnBlur); 这个控件主要的地方就是,继承TextBox,和IPostBackEventHandler接口!公开OnBlur事件就可以了! 完整的代码如下: using System; 
namespace Region.Controls 
{ public class PostBackTextBox : System.Web.UI.WebControls.TextBox,System.Web.UI.IPostBackEventHandler 

protected override void Render(System.Web.UI.HtmlTextWriter writer) 

Attributes["onblur"] = Page.GetPostBackEventReference(this); 
base.Render (writer); 
} public event EventHandler OnBlur; 
public virtual void RaisePostBackEvent(string eventArgument) 

if (OnBlur != null) 

OnBlur(this, null); 
} } } 

解决方案 »

  1.   

    或者在服务器的事件onchange里面写内容,注意设为autopostback=true;
      

  2.   

    <asp:textbox onblur=checkValue(this.value) ...function checkValue(arg) {
           if(arg != 'hello') 
            //...
           else
            // ...
    }
      

  3.   

    直接用js验证就行了
    <asp:textbox onblur=check(this)>
    <script>
    function check(arg) {
           if(arg.value != '') 
            //...
           else
            // ...
    }
    </script>
      

  4.   

    随便搜了一个demo:http://didasoft.javaeye.com/blog/274537其实技术很简单,关键是没有几个人喜欢完全主动地分析技术,都是喜欢抄点书上热门就算了。
      

  5.   

    技术方面的教程,参考:http://www.google.com.hk/search?q=asp.net+ajax+ScriptService&hl=zh-CN&newwindow=1&safe=strict&rls=com.microsoft:zh-cn:IE-SearchBox&source=lnt&tbs=lr:lang_1zh-CN%7Clang_1zh-TW&lr=lang_zh-CN%7Clang_zh-TW&sa=X&ei=IFw8TLzYKYqycdqN8ZMD&ved=0CAcQpwU