Scott Hanselman

Netscape Navigator 4.6 and ASP.NET

March 31, 2003 Comment on this post [0] Posted in Web Services | ASP.NET | Internationalization
Sponsored By

If your life sucks so badly that you have to support Netscape 4.x, you might want to remember that Netscape 4 never handled Unicode/UTF-8 very well.  Since UTF-8 is ASP.NET's default Response Encoding, you'll often see the Evil Black Squares  "" ©2003 displayed instead of your text.  

Easily fixed though, change the following line in the Web.config file from

<globalization requestEncoding="utf-8" responseEncoding="utf-8" />

to:

<globalization requestEncoding="utf-8" responseEncoding="ascii" />

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Clemens will live longer than WSDL

March 28, 2003 Comment on this post [4] Posted in Web Services
Sponsored By

Had a nice chat with Clemens on IM today and I snarfed a gem of a quote from him with regards to his recent declaration of jihad against WSDL.  I mentioned that he may have to wait a while to see the death of WSDL and the proliferation of a newer better way...

"I will live longer than WSDL. So, I can wait.  It makes web services hard.  It makes the world hard. die die die." - Clemens Vasters

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Essential ASP.NET with Examples in C#

March 27, 2003 Comment on this post [0] Posted in Web Services | ASP.NET
Sponsored By

Fritz hits one out of the park [Don Box]

It's twue, it's twue...this book does kick extreme ass.  So often you buy a .NET book and look at only chapters 19 and 20 and the rest is fodder.  This book is NOT like that.

As you look at the Table of Contents, you notice right away this book is not structured like a typical ASP.NET book (as Fritz is not structured like a typical programmer, this is to be expected). 

It begins with Architecture (a nice first chapter) and chapter 4 gets right into the HTTP Pipeline.  The Table of Contents reads like a directory of What's Misunderstood in ASP.NET - which is exactly how it should.  It is now carried under my arm with pride, I recommend you pick up a copy.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Steven Frank's Blogging Anthem

March 27, 2003 Comment on this post [0] Posted in Musings
Sponsored By

Steven Frank (who I had the pleasure of going to college with, as well as buying Apple Newton together) has recorded "Ben & Mena," a blogging anthem if ever there was one...

"It relays the epic saga of a lonely everyblogger who dreams of finding the ultimate link that will catapult his puny blog into the limelight."

Here's some sample lyrics:

Blank page, nothin' to say
Just pictures of my cats today
Thought about the war a bunch
Now let me tell you what I had for lunch

Boys all hate me, my girlfriend dumped me
They're bombing Iraq, my oatmeal's lumpy
Wi-Fi networks in Central Park
Funny Photoshops up on Fark

Semantic web, RSS, and e-mail
Single white guy seeks athletic female
I'm busy building the digital commons
Cook me up another bowl of ramen

Referers say no-one came today...

I wanna be Ben, I wanna be Mena
The master of my domain
So send me a ping, send me a trackback
I promise I won't complain

Check it out, it's up at ~stevenf.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Programmatically modifying DIR=LTR for Right-To-Left Languages in ASP.NET

March 27, 2003 Comment on this post [5] Posted in Web Services | ASP.NET
Sponsored By

Has anyone given any thought on how to programmatically modify/add the dir= attribute to the HTML or BODY tags when the Thread's Culture in ASP.NET is a Right To Left language?

This doesn't work reliablity, as ASP.NET may batch up controls into an HtmlLiteralControl...often, not always, the body (or html) tag can't be found.  This depends on how ASP.NET decided to parse the control tree for a particular page.  Additionally, there doesn't seem to be anything in CultureInfo that would help me decide what languages are right to left...

If I can reliably get ahold of the HTML control and BODY tags and add this attribute, I'm good.

/* Doesn't work reliably */

HtmlGenericControl bodytag = (HtmlGenericControl)FindControl("body");
if (Thread.CurrentThread.CurrentCulture.TwoLetterISOLanguageName == "ar")
   bodytag.Attributes["dir"] = "rtl";
else
   bodytag.Attributes["dir"] = "rtl";

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.