Function to Convert ASP.NET bool to JavaScript bool.

I was generating some JavaScript in the server code and found that bool.ToString() doesn't create string that JavaScript expects as boolean- .Net uses first letter as capital True/False. Then I found in my own class, that I've wrote helper function a long time ago:

public static string JSToString(bool bValue)

            {

                  return bValue.ToString().ToLower();

            }

 

posted @ Friday, January 2, 2009 1:48 PM
Print

Comments on this entry:

No comments posted yet.

Your comment:



(not displayed)

 
 
 
 
 

Live Comment Preview:

 
«November»
SunMonTueWedThuFriSat
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456