How to pass the textbox text to href
<p>I have a simple text box, a button and an <code>a</code> element and I am trying to write a website URL and I need to pass this URL to <code>a</code> element.</p>

<p>This is what I've got so far:  </p>

<pre><code>&lt;a id="weburl" href="http://jquery.com/"&gt;&lt;/a&gt;
&lt;asp:TextBox ID="TextBox1" runat="server"&gt;&lt;/asp:TextBox&gt;
&lt;asp:Button ID="Button1" runat="server" Text="Button"/&gt;
</code></pre>

<p>If I click the button I need to take the text from the textbox and I need to pass to the href tag, how can I do this?</p>

<p>I am facing a problem still with this as shown below:</p>

<p>1.If I mentioned the URL in the href tag And If I give another URL in the textbox and then If I click the button it is showing me the different URL's as shown below:</p>

<p><img src="http://i.stack.imgur.com/Dsh7B.png" alt="enter image description here"></p>

<p>2.And If I remove the URL and give some other URL in the textbox and clicks the button it is not showing me anything except a blank page.</p>

<p>While debuggin I have seen that it is showing me the value of textbox what I gave and the URL I mentioned in the href tag as shown below:</p>

<p><img src="http://i.stack.imgur.com/Io6RF.png" alt="enter image description here"></p>

<p><img src="http://i.stack.imgur.com/uvPY4.png" alt="enter image description here"></p>

<p>And I need both to be equal as I do not want the href to be mentioned in the href tag I want to do it programatically as james said.</p>
