views:

420

answers:

3

Hello,

I have a custom url rewriter function that works fine. But when i are going to use a second querystring on my url, that remove the second querystring.

my friendly url: /gallery/view-ablum/?q=1 i the code: Page.aspx?id=22&q=1 , when i have past RewritePath(...) the remove &q=1 from my real page. I don't now who to fix this, i can't figure it out.

context.RewritePath(ci.PageUrl + ta + "&q=" + q, false);

Is there a IsPostBack for IHttpModule?

A: 

Is there a IsPostBack for IHttpModule?

Will depend on which event the module is subscribing to. Earlier HttpApplication events will occur before IsPostBack is determined.

But IsPostBack is WebForm specific (e.g. not used in ASP.NET MVC) is may not be available outside the Page class.

Richard
A: 

Well i get this error code when i debugg : CurrentNotification 'context.CurrentNotification' threw an exception of type 'System.PlatformNotSupportedException' System.Web.RequestNotification {System.PlatformNotSupportedException}

and i found this

- Base ( "For this operation requires IIS integrated pipeline mode.") System.SystemException (System.PlatformNotSupportedException)
Frozzare
A: 

for the question, "Is there a IsPostBack for IHttpModule"

bool isPostBack = !string.IsNullOrEmpty(context.Request.Form["__VIEWSTATE"])

..or introduce your own hidden field when not using viewstate (which is probably safer anyway)

Leon van der Walt