2011-07-26 2 views
1

WebMethod의 결과를 기반으로 페이지에 다시 게시하려면 어떻게해야합니까?webmethods 결과를 기반으로 한 페이지 다시 게시

function AssignmentConditionsSaveAS_Clicked() { 

     var txtConditionName = $('input[id$="txtConditionName"]').val(); 
     PageMethods.IsExistsSavedCondition(txtConditionName, OnSuccess, OnFailure); 
     return false; 
    } 

    function OnSuccess(result) { 
     if (result == 'true') { 
      if (confirm('A saved condition with that name already exists. Do you want to overwrite?')) { 
       return true; 
       // I want to post back the clicked button 
       // Can not use __dopostback, because its a control inside a user control      
      } 
      else { 
       return false; 
      } 
     } 
     else if (result == 'false') { 
      alert('Not Exist'); 
     } 
    } 

    function OnFailure(error) { 
     alert(error); 
    } 

또는

어떻게이 같은 somehting을 수행 할 수 있습니다 내가 제대로 이해하면

__doPostBack($('input[id$="btnSaveAS"]'), ''); 
+0

또는 $ ('입력 [아이디 $ = "btnSaveAS을"]')해야한다. – 2GDev

답변

1

당신은 그냥이

__doPostBack($('input[id$="btnSaveAS"]').attr('name'), ''); 
0

, 당신은 단지 버튼을 얻고을하기 위해 클릭() 함수를 호출 할 필요가 다시 게시하십시오.

+0

이 네 자네 말이 맞아 ...()을 클릭합니다. – Rauf

관련 문제