title: Uncaught reference error:False is not defined
body: <p>I have the following call to javascript:</p>
  
  <pre><code>protected override void OnPreRender(EventArgs e)
      {
          base.OnPreRender(e);
  
          this._BtAdd.Attributes.Add("onclick", "GXDualListBox_MoveDualList(" + sourceListId + ",  " + destListId + ",  " + selectedValuesId + ", false, true, "+ this._SortByDescription +");");
          this._BtRemove.Attributes.Add("onclick", "GXDualListBox_MoveDualList(" + destListId + ",  " + sourceListId + ",  " + selectedValuesId + ", false, false, " + this._SortByDescription + ");");
  
          if (!this._PostBackOnAll)
          {
              this._BtAddAll.Attributes.Add("onclick", "GXDualListBox_MoveDualList(" + sourceListId + ",  " + destListId + ",  " + selectedValuesId + ", true, true, " + this._SortByDescription + " );");
              this._BtRemoveAll.Attributes.Add("onclick", "GXDualListBox_MoveDualList(" + destListId + ",  " + sourceListId + ",  " + selectedValuesId + ", true, false, " + this._SortByDescription + " );");
          }
  
          // Check if user can double-click on listbox item to move it
          if (this._AllowDblClick)
          {
              this._LstSource.Attributes.Add("ondblclick", "GXDualListBox_MoveDualList(" + sourceListId + ",  " + destListId + ",  " + selectedValuesId + ", false, true, " + this._SortByDescription + " );");
              this._LstDestination.Attributes.Add("ondblclick", "GXDualListBox_MoveDualList(" + destListId + ",  " + sourceListId + ",  " + selectedValuesId + ", false, false, " + this._SortByDescription + " );");
          }
      }
  </code></pre>
  
  <p>this._SortByDescription  is bool which would be false in this case. The javascript is as follows:</p>
  
  <pre><code>function GXDualListBox_MoveDualList(srcList, destList, selectedValues, moveAll, isAdd,sortByDescription) 
  {
  
  if ((srcList.selectedIndex == -1) &amp;&amp; (moveAll == false)) {
      return;
  }
  newDestList = new Array(destList.options.length);
  
  for (var len = 0; len &lt; destList.options.length; len++) {
      if (destList.options[len] != null) {
          newDestList[len] = new Option(destList.options[len].text, destList.options[len].value, destList.options[len].defaultSelected, destList.options[len].selected);
      }
  }
  for (var i = 0; i &lt; srcList.options.length; i++) {
      if (srcList.options[i] != null &amp;&amp; (srcList.options[i].selected == true || moveAll)) {
              newDestList[len] = new Option(srcList.options[i].text, srcList.options[i].value, srcList.options[i].defaultSelected, srcList.options[i].selected);
              len++;
      }
  }
  
  if (sortByDescription) {
      newDestList.sort(GXDualListManager_CompareOptionValues);   
      newDestList.sort(GXDualListManager_CompareOptionText);  
  }
  
  
  for (var j = 0; j &lt; newDestList.length; j++) {
      if (newDestList[j] != null) {
          destList.options[j] = newDestList[j];
      }
  }   
  }
  
  if (isAdd)
      buildSelectedList(destList, selectedValues);
  else
      buildSelectedList(srcList, selectedValues);
  } 
  </code></pre>
  
  <p>When I hard code this._SortByDescription as 'false' in the javascript call, it works. But replacing 'false' with this._SortByDescription results in error. Also I observed while debugging that the javascript receives the value of this._SortByDescription as 'False' instead of 'false'. Not sure if this matters. 
  I am working on javascript for the first time. Please help.   </p>