前台使用脚本调用
__doPostBack('控件?','Check');像这样的要怎么使用?

解决方案 »

  1.   

    首先在页面page上加EnableEventValidation="false"避开验证,使用__doPostBack('控件id','自定义参数')即可实现模拟服务器端控件回刷
      

  2.   

    function AudConfirm(ApplyID)
    {
         if(confirm("您确定操作ID为" + ApplyID +"的用户?" ))
         {
             __doPostBack('__Page','AudConfirm:' + ApplyID);
         }
    }后台:
    继承 IPostBackEventHandler 接口void IPostBackEventHandler.RaisePostBackEvent(string eventArgument)
    {
       switch (eventArgument.Split(':')[0])
       {
           //
       }
    }是这样的吗?
      

  3.   

    __doPostBack(eventTarget, eventArgument) 这个方法接收两个参数__doPostBack的用法是,id: 服务器控件的ClientID,eventArgument: 传回服务器的参数。这个参数在服务器端通过IPostBackDataHandler.LoadPostData(string postDataKey, NameValueCollection postCollection)来读取