aspx httphandler messing up my gridview paging postback target

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Matt Winward

    aspx httphandler messing up my gridview paging postback target

    Hi all.

    I've got a little problem with my gridview paging and I'm not sure how
    to resolve it.

    Basically, I'm handling all aspx requests with my own httphandler.
    This does a url rewrite, so the url you see is not the page that is
    actually returned. To add to the complexity, I have a module which
    does a similar url rewrite at a higher level.

    So, this url

    ==domain.com/CustomerName/Default.aspx

    is handled by the module, which uses Server.Transfer Request to load

    ==domain.com/WebApplication/CustomerName/Default.aspx

    and, in turn, a handler within the web app actually loads something
    like this...

    ==domain.com/WebApplication/Default.aspx?cu stomer=x

    The problem is that I have a paging gridview control in an updatepanel
    in Default.aspx and it's doing a postback to /Default.aspx (ie at the
    site root), which doesn't exist, so it throws a 404 and this manifests
    itself as the following javascript error:

    Sys.WebForms.Pa geRequestManage rServerErrorExc eption: An unknown error
    occurred while processing the request on the server. The status code
    returned from the server was: 404.

    I need it to postback to either of the three url formats above. Any of
    them should work fine. Just getting rid of the / at the beginning of
    the target should fix it... but I can't find a way to change its
    target.

    Is there a way to do this? Custom paging perhaps?


    Thanks,


    Matt
  • Matt Winward

    #2
    Re: aspx httphandler messing up my gridview paging postback target

    In case anyone is interested, I couldn't find a way to solve the
    paging postback issue, so I've ended up writing my own webcontrol that
    using postbacks to load the data from a web service.

    Comment

    Working...