title: How to get the Tempdata in javascript?
body: <p>I have this method in my Controller that saves the value in a Tempdata, as shown below.</p>
  
  <pre><code>public Boolean SaveSession(string id) {
          TempData["CurrentTab"] = id;
          return true;
      }  
  </code></pre>
  
  <p>Now in my javascript, I want to get the value in that TempData. But when I alerted the value I got this value. "[object HTMLSpanElement]"</p>
  
  <pre><code>@{
           if (TempData["CurrentTab"] != null){           
              @:alert("" + @TempData["CurrentTab"].ToString())                
          }
      }
  </code></pre>
  
  <p>How can I get the string value of that Tempdata?</p>
  
  <p>Thanks</p>