ASP.Net and the Confusion of GET and POST
My loathing for ASP.Net has been well-known in these pages, but part of me has made peace with it. There are some things about ASP.Net that I very much like, and I promise I’ll post about them one day.
Today ain’t that day.
I will never accept the stupidity of the server-side FORM tag and the confusion of GET and POST. Never. It drives me nuts – ASP.Net encourages you to POST everything, and that’s just not right. It’s not the intention of the HTTP spec, and it kills usability in a lot of situations.
Case in point – the Applebees menu system displayed above.
I’m having a lunch meeting at my office today for my church IT committee. We have an Applebees on the next block, and I wanted to email everyone a link to the menu for this restaurant. But I can’t.
Problem is, the developer who built their site used a DataGrid control to display the restaurant listings, and he bound the link buttons in it to server-side events. So those buttons in the picture are actual form buttons which POST data, not simple hyperlinks that link to an “email-able” URL. So when I click the buttons, I get a generic URL that’s useless without POST data...which I can’t send in an email.
Here’s the URL:
If you click that, it will just loop back to the search form (unless you’ve been there before, because it appears to save your last restaurant as a cookie or session value).
The thing is, I know to check this. I know to look in the URL and make sure it’s valid on its own. But how many other people do? I wonder how many people every single day email that URL to someone and get a response like, “That URL you sent didn’t work for me...”
Why, oh why, do people do this? Oh yeah, because ASP.Net encourages you to do it.
(Sad thing is, making this particular situation GET-friendly wouldn’t have been much more difficult. It appears to be a cross-page postback anyway, so how hard would it have been to have just put the menu ID in the querystring and make the link an actual hyperlink? It’s not like it’s posting back to itself.)
Yes, I know, other languages encourage you to do stupid things too, however they’re usually confined to server-side and code-centric stupidity which doesn’t affect the user so much. The difference here is that ASP.Net infiltrates the client way too damn much, and stuff like this results.
This is item #196 in a sequence of 356 items.
You can use your left/right arrow keys or swipe left/right to navigate