Feb 11, 2008 / software ~ .net ~ ajax
Small gripes with ASP.NET PostBack and Ajax

A few years ago I was working on a Patient Administration System for an NHS Trust. Clinicians wanted to be able to copy the URL of the current page, and send it to another clinician in an email. Kind of like "See blood results here: [link]". Of course, security was built in so ActiveDirectory knew who could see what.

As you know, with the postback model, you can't go to a search page, navigate around, apply some filters and then have a link in your URL bar that you can copy and paste into an email, taking the recipient back to that exact view. With PostBack, the information to view the page is hidden in the POST. This frustrates me! Anything that involves viewing data should be accessible via a link, IMHO.

Do the principles of REST agree?

I have the same problem with Ajax. I'd like to be able to manipulate a page using Ajax call-backs, and have the link at the top of the page updated as I do so, so I can re-instate the view with that state using only a URL.

Am I asking too much?

Google Maps gives you a workaround by letting you pick "link to this page". Somewhere Google keeps track of how you can get to your Ajax manipulated page via a simple URL.

With the PAS system, the only option I found was to make the postbacks redirect to a GET, thus updating the URL in the address bar. It worked, but it felt clunky.

You may also like...