ASP.NET Validators now work Client-Side on Mozilla with Whidbey Beta2

I was on a Microsoft Unplugged Q&A panel at ASP.NET Connections last night in Las Vegas, and someone asked about what our plans were for uplevel support for non-IE browsers.  I talked about the new controls we have in Whidbey like TreeView, Menu and others use a common sub-set of Javascript that works with IE, Mozilla, Safari and others. 

Brad Millington (who was thankfully also on the panel with me) then mentioned how he and others on the pages/controls team just finished doing some work in the Beta2 branch to go back and make the validation controls that we shipped in V1 and V1.1 also now work client-side with Mozilla (previously the controls worked client-side with IE -- but only server-side with non-IE browsers).  A pleasant surprise for me since I didn't think that was happening (I missed that checkin mail), and something I know that others will be excited about too...

Fun Stuff.

 

Published Tuesday, November 9, 2004 10:52 AM by ScottGu

Comments

# re: ASP.NET Validators now work Client-Side on Mozilla with Whidbey Beta2

Tuesday, November 9, 2004 2:13 PM by James Geurts
Cool, glad to hear that Microsoft is recognizing the rest of the internet browsing world... It's nice having new features/controls, but to me, if it's not supported for more than IE, then the value and overall usability is minor.

# re: ASP.NET Validators now work Client-Side on Mozilla with Whidbey Beta2

Tuesday, November 9, 2004 4:12 PM by asdf
You are still thinking it the wrong way. Do not support browsers, support standards. That way you support all browsers.

# re: ASP.NET Validators now work Client-Side on Mozilla with Whidbey Beta2

Tuesday, November 9, 2004 9:02 PM by 摩托车配&a
good article,thanks

# re: ASP.NET Validators now work Client-Side on Mozilla with Whidbey Beta2

Wednesday, November 10, 2004 10:04 AM by Asbjørn Ulsberg
Identifying browsers based on their user agent string is braindead. What you should rather do is identify what they support by identifying what they support. Sounds like a chicken-egg situation? Well, it isn't.

Instead of assuming that a browser which reports that it is "Mozilla/4.0 Xyz" supports a given feature, just check if the feature is available instead. Do a 'if (feature)' in JavaScript. If the object doesn't exist, it will evaluate to false.

Also, separate all JavaScript from the HTML code. That way all HTML code will work regardless of what JavaScript is to be applied in browsers that do support it. This can easilly be done cross-browser, and working with the W3C DOM actually buys you support into the future as well, not only the past.

The whole idea of "non-IE browsers" is rather brain-dead. Yes, Internet Explorer has greatest market share, but when you can do everything cross-browser by following standards and still make it work in Internet Explorer, why do it any other way?

Use the W3C for what they're worth. Then you actually have a good excuse when code you write doesn't work too. Not supporting Internet Explorer-proprietary objects is something you expect non-IE browsers to do. Not supporting W3C's standards is something else.

So please stop talking about non-IE browsers and start talking about standards instead. "Yea, we support DOM1, DOM2, HTML 4.01, CSS1 and CSS2". That's something that makes sense. "We support Intenret Explorer 4, 5 and 6 plus Mozilla 1.7" does not make sense. At all.

# re: Asbjørn Ulsberg

Wednesday, November 10, 2004 9:06 PM by Marshall
"Yea, we support DOM1, DOM2, HTML 4.01, CSS1 and CSS2".

yes but since ie doesn't fully support these then it sounds a little crazy too.

but i hear you and agree 100%

still it's great to see MS is working to support everyone and not trying to lock people into MS only products.

i much prefer using MS stuff because it works the best (the new VS tools are second to none imo).

# re: ASP.NET Validators now work Client-Side on Mozilla with Whidbey Beta2

Sunday, November 14, 2004 6:20 AM by LukCAD
It was always: "MS is working to support everyone". You can read it two years ago in WebMatrix Tour, for example: "Note The Calendar control displays a single month calendar that allows the user to select dates and move to the next or previous month. This control is more advanced because you can customize the appearance of the Calendar control by setting the properties that control the style for different parts of the control, including the content and formatting of individual date cells. At runtime it emits standard html output -- ensuring that it works against any browser client (IE, Netscape, Opera, etc). "
So it is depends from good tested and written controls as i see. Do all controls in ASP.NET 2.0 correspond of compatibility with (IE, Netscape, Opera) ? Or is predefined list some controls that can't be adopted to Netscape or Opera?

# re: ASP.NET Validators now work Client-Side on Mozilla with Whidbey Beta2

Tuesday, November 16, 2004 5:17 AM by Ramamurthy
Microsoft should have provided Client side script for .NET Version 1.1

# re: ASP.NET Validators now work Client-Side on Mozilla with Whidbey Beta2

Wednesday, November 17, 2004 7:30 PM by jojo
"Microsoft should have provided Client side script for .NET Version 1.1 "
agree!!

# re: ASP.NET Validators now work Client-Side on Mozilla with Whidbey Beta2

Wednesday, December 1, 2004 12:36 PM by sfb
How is client side validation any more secure than no validation at all?

# re: ASP.NET Validators now work Client-Side on Mozilla with Whidbey Beta2

Wednesday, December 1, 2004 12:50 PM by scottgu
Client-side validation isn't for security, but rather to improve the client-experience (so that they get immediate notification of a validation error).

ASP.NET then always does validation on the server as well -- which is where the security really kicks in.

# re: ASP.NET Validators now work Client-Side on Mozilla with Whidbey Beta2

Wednesday, December 8, 2004 8:36 PM by Rob
I hate to say this, since I am by far an expert in anything, but 'Patrick' is wrong. I have an ASP.NET application, and it does not support Netscape 7.2. I added his code into my web.config, and guess what? It still does not support Netscape 7.2.

I'd like to know what he does to make this support those browsers...