title: How to get the String Value to the textbox using javascript with asp.net
body: <p>I am creating a folder by generating a random string and I need to get that string value to the textbox using javascript.</p>
  
  <p>Here is my javascript Code:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
   var tempDir = randomString(8);
                  document.getElementById("currentDirectory").value = tempDir;
                  alert(tempDir);
  &lt;/script&gt;
  </code></pre>
  
  <p>This is the textbox where I need to display</p>
  
  <pre><code>&lt;asp:TextBox ID="TextBox1" runat="server"&gt;&lt;/asp:TextBox&gt;
  </code></pre>