Not all postbacks happen with JS. Only things like the dropdown list or
other non-<input> controls. If all you have is a simple submit button, then
JS can be turned off and still send postbacks. I personally have never
checked to see if a browser supports JS. My guess is that they do not since
it most likely so widely supported and used (aside from the few paranoid
people). But if you want to ensure the user is told they need JS before
they actually try to do something, then that would not be a problem.
From my experience, it is usually best to have each page their own physical
page (unless they have similar behavior and layout). If you use the
multiview, the server has to load the object model for all pages, regardless
of whether or not you view the page. This can unnecessarily use processing
cycles. It can also be harder to maintain as you cannot just target a fix
for a particular page but rather have to sift through the code that
generates all the views to get to your bug.
"Chris" <mi*********@gm ail.com> wrote in message
news:2r******** ************@fe 2.news.blueyond er.co.uk...
Hi all,
I've recently started learning ASP.Net and have a few questions mostly
regarding best practice.
As postback uses JS is it normal practice to check if the browser
supports/has JS enabled to ensure the site functions correctly? I know the
vast majority of browsers probably have JS installed and enabled, but I'd
still like to know what the standard technique is for doing this.
Secondly, I've been playing about with multiview and ASP hyperlink
objects. For a small site (Around 5 pages) is the use of multiview
overkill? Is it mainly used for wizards etc? This relates to the first
question too. By using this technique (all hyperlink objects firing a
postback), any browser without JS wouldn't beable to view the site.
Regards,
Chris