Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
|
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 26th, 2008, 12:07 AM
Authorized User
 
Join Date: May 2007
Posts: 95
Thanks: 5
Thanked 0 Times in 0 Posts
Default Scripting is disabled in IE or any other browser

Hi All

I need little bit of advice from all of you.Generally i use javascript for validation purpose, but what if the javascript is disabled for the user in internet explorer( scripting is disabled in INTRANET Zone), then the validation will fail! Apart from going for server side validation, is there any other way like if scripting is disabled , then a message would pop up or it can be redirtected to some other page. How it can be done in C# to check this condition that if Scripting is disabled, a message would pop up to the user to enable scripting in Browser.


-- Abhishek





 
Old May 26th, 2008, 03:58 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

The traditional way is to use noscript tags. Anything between these is only shown if scripts are not allowed. You can also construct a div with a message and then set it invisible using client-side script. If scripting is not allowed then the message shows.

You should, as a matter of course, use server-side validation as well as client-side.


--

Joe (Microsoft MVP - XML)
 
Old May 26th, 2008, 04:25 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

If you are using ASP.Net and the valiation controls then you can simply check Page.IsValid which will run the validation server side I believe.

/- Sam Judson : Wrox Technical Editor -/





Similar Threads
Thread Thread Starter Forum Replies Last Post
Launch default browser in a new browser window haiying Beginning VB 6 1 August 30th, 2005 05:48 PM
Disabled icons EricJ VB How-To 0 July 12th, 2005 09:51 AM
Disabled textbox r_ganesh76 ASP.NET 1.0 and 1.1 Professional 4 October 4th, 2004 11:14 PM
Watch Window is disabled LaFeverMF ADO.NET 1 July 21st, 2004 11:32 PM
disabled popup renee_santoscoi Javascript How-To 5 November 11th, 2003 02:20 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.