title: How do I pass the value of a session variable to $.ajax()?
body: <p>I have a session variable containing some string data. How do I access the session variable from the markup (not the code behind) and pass its value to the following code? I need to replace the ?????  with the actual value of the session variable. Thanks!</p>
  
  <pre><code>function btnAddTask_onclick() {
              var inputData = { task: $(".taskInput").val(), sessionVar: ????? };
  
              $.ajax({
                  "url": "AddTask.aspx",
                  "type": "get",
                  "data": inputData, 
                  "success": function (response) {
                      alert(response);
                      $("body").append(response);
  
                  },
                  "error": function (response) {
                      alert("Error: " + response);
                  }
              })
          }
  </code></pre>