M
Matt Winward
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.TransferRequest 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?customer=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.PageRequestManagerServerErrorException: 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
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.TransferRequest 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?customer=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.PageRequestManagerServerErrorException: 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