mardi 14 juin 2016

removing #FragmentIdentifier from URL on postback

Some users who navigate to my page do so via an url like this : http://domain/ProductDetail.aspx?Productid=123#Pricing

In this section is a asp:button to make a purchase. This button cause a postback, and when the page rerendering in the broswer the FragmentIdentifier #Pricing is still in the address window.

This is causing problems because there is new content rendered on the page which isn't visible if the browser navigates to the #Pricing section.

How do I prevent the FragmentIdentifier on postback?

Clarification: It appears that this problem happens in Chrome but does not happen in IE8 or FireFox. Chrome holds on to the #FragmentIdentifier after postback even those there is no reference to it in the action attribute.

Aucun commentaire:

Enregistrer un commentaire