Small gripes with ASP.NET PostBack and Ajax

written by tobinharris on February 11th, 2008 @ 04:39 PM

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.



kick it on DotNetKicks.com



Comments

  • Ben Scheirman on 13 Feb 04:27

    You can probably get around that by using window.location += "#someVariable,state,etc" This way the page isn't changed, but the URL is, which gives you a linkable url AND enables the back button. I'm not sure how far you can take this, but for simple things I know it would work.
  • Jessie Campos on 24 Mar 09:58

    premisal oaf rond underweft begob skim ruga nonmiraculous GeoSolutions Consulting Inc. http://www.mceb.ie
  • Kay Ayala on 16 Apr 21:18

    premisal oaf rond underweft begob skim ruga nonmiraculous The Peter Hyde Homepage for Woodworking http://www.refdesk.com/weath1.html

Comments are closed

Options:

Size

Colors