I got surprised when I visited some sites with an ‘aspx’ extension at the end of their URLs and when I looked at their html source I didn’t see any view state like the follwing:
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="SNIKalxBOk0/lp+SgXklgi/0/IUoRXTjEjp6NrL2ColFXGht1bTDit5V+wHdkcuM3YVmVNKG1jpM6zAg+MQCnvPDvlEvK8RNwHblq8NN1Ys=" />
How did they prevent this to happen? even if you turn the view state off you’ll get at least of of the above input in your HTML output.
Here is one of the examples that I looked at: http://www.ada.org/index.aspx
1
The site, or at least the pages I clicked on, are almost certainly not using WebForms. One of the key give-aways is the complete lack of a single top-level form such as:
<body>
<form method="post" action="/">
That combined with the lack of __VIEWSTATE and __EVENTTARGET and __EVENTARGUMENT hidden inputs seems fairly conclusive. However looking at the HTML for the site the following jumps out at me:
<span id="ADASlideShow1_rptSlideshow_ctl03_lblVideoType" style="display: none;">None</span>
The id is typical webforms output so this would suggest that either:
-
They have ported an ASP.NET WebForms site over to some other technology (possibly just plain HTML contained in a .aspx file – as the previous poster mentioned the functionality seems to be done using Flash and jQuery) and retained the HTML structure and ids in order to keep the CSS and Javascript in working condition.
-
Or they are using ASP.NET WebForm controls but with all ViewState and control interactions turned off – however I’m fairly sure that without the top level form tag webform controls just won’t work at all (however it’s been a while since I did any webforms work so I could be proved wrong).
4
They are using viewstate — but it looks like they did disable it for the home page and some of the major landing pages, see http://www.ada.org/productguide/c/28/Caries-Detection-Systems for an example of a page with viewstate.
Really not too hard a trick to pull off if your site is largely a brochure site such as this one.
1