PageMethods not working properly

Last post 04-21-2009 6:43 PM by sdroy. 4 replies.

Sort Posts:

  • PageMethods not working properly

    03-31-2009, 12:52 PM
    • Member
      5 point Member
    • sdroy
    • Member since 07-17-2008, 5:08 PM
    • Posts 11

    Hi

    I have a AJAX PageMethod definition as webmethod and it's not getting called. Can someone tell me what is not right? I have checked ScriptManager EnablePageMethods, ScriptMethod/WebMethod and everything looks fine. Just wanted to add that my PageMethod is having a db connection and sp call and that page inherits a MasterPage and Script Manager is defined in Master Page.

    Thanks,

    Roy 

     

     

  • Re: PageMethods not working properly

    04-01-2009, 12:24 AM
    Answer
    • Contributor
      2,288 point Contributor
    • anup_daware
    • Member since 02-23-2006, 12:37 PM
    • India, Pune
    • Posts 417

    Hi,

     

    Your page method must be static. Have you done that?

    Also please post your code here. That will help us in finding the actual problem.

     

    Thanks,

    Anup Daware

    --Go for it now. The future is promised to no one.--
  • Re: PageMethods not working properly

    04-03-2009, 2:59 AM
    Answer
    Hello sdroy
     
    Without seeing the related code and error message we cannot detect what caused the facing issue.
     
    So, I would like to suggest you refer to the following articles, and try to find if there is anything wrong in the code:
     
    Calling Static Methods in an ASP.NET Web Page
    http://www.asp.net/AJAX/Documentation/Live/tutorials/ExposingWebServicesToAJAXTutorial.aspx
     
    How to invoke PageMethods in MasterPage
    http://weblogs.asp.net/yonggangmeng/archive/2008/11/13/how-to-invoke-pagemethods-in-masterpage.aspx
     
    If the facing issue still cannot be solved, would you please describe the facing issue more detail and post the related code? We will glad for help.
     
    Thanks.

     

    Lance Zhang
  • Re: PageMethods not working properly

    04-03-2009, 8:07 AM
    • Member
      280 point Member
    • sidharth049
    • Member since 11-03-2008, 5:19 AM
    • calicut
    • Posts 82

    can you post the code

    please click 'Mark as Answer' if my post helped you.
  • Re: PageMethods not working properly

    04-21-2009, 6:43 PM
    • Member
      5 point Member
    • sdroy
    • Member since 07-17-2008, 5:08 PM
    • Posts 11

    I checked everything and all seem to me fine in the code. There is a strange thing that is happening to me. Maybe someone can throw some light on that. Once my "Calling Static Methods in an ASP.NET Web Page" stops, I open up ASP.Net web site administration tool->Application Tab, take application offline & then online (which i believe bounces all the asp.net processes) and recomplile my solution and everything starts to work fine.

    Can someone please help me? I would really appreciate.

    Thanks in advance,

    Roy

     

Page 1 of 1 (5 items)