I'm using fragment identifiers to run a tabbed browsing control and it would be nice if the post-back could preserve the tab as that is less jarring to the user. To that end I've been searching for a method to preserve the fragment identifier and am at a total loss.
Is there a way to read or save the fragment identifier from the referring url during a page post-back in ASP.NET?
You can use
document.location.hash
from javascript to read the fragment. You can use this to send something to the server in the POST, and then the server could include it in a 30x redirect.You can't save/retrieve URL fragments on the server side because Browsers don't send them -and they aren't supposed to- to the server. See here.