Tuesday, April 7, 2009

C# bool and Javascript Boolean True vs true

A little tid bit, in JavaScript a boolen is true while in C# it is True

When writing JavaScript from C# you must do this

strScript.Append("var IsSSL=" + this.m_oReportData.ReturnValueT.IsSSL.ToString().ToLower() + ";");

Note that you must do ToString().ToLower() or else javascript craps out and doesn’t know what True means.

No comments:

Post a Comment