title: On page load show the value in textbox in javascript
body: <p>I am using asp.net mvc2.</p>
  
  <p><strong>Javascript Code:</strong></p>
  
  <pre><code>$(document).ready(function () {
            $("#candidatecontact").hide();              
            document.getElementById("counting").value =  '&lt;%=ViewData["ResumesCount"] %&gt;';
              $('#butt2').click(function () 
              {
                   count();
              });
          });    
  
  function count() {               
               var tempId = &lt;%=Model.Id%&gt;; 
               var url = '/Page/Count';
               $.ajax({
                      type: "GET",
                      url: url,
                      data: { id : tempId}, 
                      dataType: "int",
                      success : function (count) {                            
                          SetCount(count);                            
                      }
                  });                                     
          }
  </code></pre>
  
  <p><strong>HTML Code:</strong></p>
  
  <pre><code>&lt;% ViewData["ResumesCount"] = remainingHorsCount; %&gt;
  &lt;input id = "counting" type = "text" style="width:20px;"/&gt;
  </code></pre>
  
  <p>when page load in the above textbox show the value of <code>ViewData["ResumesCount"]</code>.. Please give me the ideas to do this?</p>