locked
ASP.NET Client CallBack RRS feed

  • Question

  • User485493498 posted

    I have a checkbox and a image control. When user checked the checkbox, make call to server method using ASP.NET client callback. The server method returns the latest image from specified folder and updates the src property of image control. And when the checkbox is unchecked the default image is shown. All is working according to our needs, but the problem occur when user repeatedly check/uncheck the checkbox. During this the checkbox is unchecked but the default image is not showing. So what will be the solution so that the state and the image src result are accurate?

    Regards,

    Imran Ahmad Mughal 

     

    Friday, June 27, 2008 8:30 AM

Answers

  • User1004743283 posted

    greeting there

    i dont know if you are using scriptmanager add the following javascript below the script manager tag where this js  used to disable the postback triggerer untill the respose ends

    function DisableAsyncPostbackCaller()

    {

    var pbControl = null;var prm = Sys.WebForms.PageRequestManager.getInstance();

    prm.add_beginRequest(BeginRequestHandler);

    prm.add_endRequest(EndRequestHandler);

     

    function BeginRequestHandler(sender, args) {

    pbControl = args.get_postBackElement();

    pbControl.disabled = true;

    }

    function EndRequestHandler(sender, args) {pbControl.disabled = false;

     

    pbControl =
    null;

    }

    }

     

    hope being usefull and if i dontget u right please send ur details

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, June 27, 2008 8:47 AM