Thursday, March 31, 2011

Modal Window Problem

Hi I am using modal window for my VB.NET program and i am trying to open this child modal window from another window, afte i close the child modal window i am trying to refresh the parent but i am getting retry/cancel popup, i tried a lot of things to avoid but i can't get rid of this popup :-( is there any way i can avoid this popup? I would really appreciate your help

Thanks Faisal

From stackoverflow
  • Hello,

    Did you tried to bind an OnClickClient javascript function to the button who close the modal popup to manually call a PostBack to the server ?

    function fnClickOK(sender, e) { 
    __doPostBack(sender,e); 
    }
    

    that's the function you must include in your code and you can bind the button in the code behind like that

    yourButton.OnClientClick = String.Format("fnClickOK('{0}','{1}')", yourButton.UniqueID, "");
    

    Like that, the postback should occur and because of the page reload all Modal will be hided.

    Good Luck!

0 comments:

Post a Comment