views:

69

answers:

3

Is there a way to use ASP.NET in browsers that javascript is not enabled?

Whereas all buttons/actions do a postback using javascript by default, i guess that isn't possible, but using ASP.NET MVC could be a solution?

What do you think is the best way to deal if the user's browser is with javascript disabled? Block the page access telling that the user need enabled?

So, is this really necessary?

A lot of large sites do nothing to handle that.

A: 

Yes, asp.net will downgrade itself to not use javascript for validation of a browser doesn't have it enabled.

Well it depends on who your audience is. If you have visually impared people accessing the site you need to have a non-js enabled site, because their readers (browsers) can't handle javascript.

There are also a lot of people who have js turned off for security reasons, and unless they have a reason to trust your site, they won't turn it on.

If you don't mind people in demographics like these, then sure you can just tell them they need a browser with it turned on.

Kevin
+3  A: 

A lot of large sites do nothing to handle that.

A lot of large sites are rubbish created by incompetents.

Apply the techniques of Progressive Enhancement: create a functional application or site that works without scripting, even though it may be clunky and long-winded to navigate. Then use scripting to enhance that basic version by adding the stuff that makes it slick and easy to use.

Try going to something like Google Maps with JS disabled; you still get a basic site you can use to search and view static map images. That's the professional approach.

NickFitz
A: 

Yes you can. ASP.NET will do a postback directly to the server if JavaScript is disabled on the client, and reload the site if any errors occur during validation. I tested this properly recently in a few non-JS browsers and disabled JS completely in Fx, Safari and Opera, and got exactly the results I was hoping for. Validation errors occured after a reload of the page.

Jesper Karsrud