title: Calling Jquery from an ASP.net treenode in IE
body: <p>I am having problems calling a jquery function from an asp.net treenode control.
  Here is the treenode code in the aspx file.
  The method I am using is to put a javascript link in the "navigateUrl" attribute.</p>
  
  <p>Below is the code:</p>
  
  <pre><code>&lt;asp:TreeNode Value="Level1" 
                  NavigateUrl="javascript:$('#mainContentContainer').load('report.aspx?level=1');"
                  Text="Level 1"
                  Target="Content"
                  expanded="false"&gt;
  </code></pre>
  
  <p>This works perfectly in CHROME. The report.aspx content loads into the mainContentContainer div as expected when I click on the treenode "Level 1". </p>
  
  <p>In Internet Explorer however (v8 and 9), it just opens another browser window and attempts to load the JavaScript link as if it were a URL. For some reason the address bar only shows this portion of the link: "javascript:$('" and the content window gives this error "Internet Explorer cannot display the webpage"</p>
  
  <p>I have searched for this problem and all solutions I found suggest either using the "OnClick" attribute to make the JavaScript call or to set the "target" attribute of the " element to "_self"</p>
  
  <p>Neither of these options worked for me. I can not give the  tag an "OnClick" attribute because it is not a valid attribute for this asp.net control.</p>
  
  <p>Type 'System.Web.UI.WebControls.TreeNode' does not have a public property named 'onclick'
  is the error that appears in the browser (returned as the standard .net error webpage)</p>
  
  <p>I tried the target="_self" option and the only change was that instead of a new browser window opening with an error. The current browser will just display [object Object] without any change in the address bar.</p>
  
  <p>Another solution I read was to put "retun false" after the javascript call but this gives a "return statement outside of function" javascript error. </p>
  
  <p>Please let me know if there is a solution to call jquery.load from an asp.net treenode control. </p>