Richard Dudley

Pencil Bros. Geology, Inc. "We Deliver" Quality Assured * Satisfaction Guaranteed

<December 2008>
SuMoTuWeThFrSa
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910


Navigation

Pittsburgh Dot Net

Crystal Reports .NET

Subscriptions

Post Categories

Article Categories



Wednesday, May 05, 2004 - Posts

XP Patches messing up right-click
This post has been moved to http://www.rjdudley.com/blog/WindowsXPHangsOnRightClick.aspx.  Please update your bookmarks.

posted Wednesday, May 05, 2004 7:27 PM by richard.dudley

Hey MS - Follow your own recommendations in sample code!

I've always been annoyed by some of MS's sample code that does not follow their own best practices or recommendations.  Today's annoyance comes from:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWebUIPageClassRegisterStartupScriptTopic.asp

Microsoft says:

Note   Remember to include HTML comment tags around your script so that it will not be rendered if a requesting browser does not support scripts

Four lines later starts the sample code, where Microsoft does:

      ' Form the script to be registered at client side.
         Dim scriptString As String  = "<script language=JavaScript> function DoClick() {"
             scriptString += "showMessage2.innerHTML='<h4>Welcome to Microsoft .NET!</h4>'}"
         scriptString += "function Page_Load(){ showMessage1.innerHTML="
         scriptString += "'<h4>RegisterStartupScript Example</h4>'}<"
         scriptString += "/"
         scriptString += "script>"

Those are lovely HTML comment tags, yes?

posted Wednesday, May 05, 2004 8:01 AM by richard.dudley




Powered by Dot Net Junkies, by Telligent Systems