how to convert char to ascii in javascript
<p>I would like to know how to make this code work becouse currently it doesn't work. I should get string and it supposed to convert it to ASCII. I have 2 text boxes with input and the output result and one button the does the conversion. Big thanks for the help!!!</p>

<p></p>

<pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head runat="server"&gt;
&lt;title&gt;Convert to ASCII&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;form id="form1" runat="server"&gt;
    &lt;div&gt;

        Enter your mail:
        &lt;input TextBox ID="TextBox1" runat="server"     ontextchanged="TextBox1_TextChanged"&gt;&lt;TextBox/&gt;

&lt;/p&gt;
        &lt;Button type="Button" onclick="Ascii()"&gt;Convert to ASCII&lt;/button&gt;

&lt;/p&gt;
        Output:
        &lt;input TextBox ID="TextBox2" runat="server"     ontextchanged="TextBox2_TextChanged"&gt;&lt;TextBox/&gt;
&lt;/p&gt;
&lt;p&gt;

&lt;script&gt;
        function Ascii() {
        textbox2 = String.charCodeAt(TextBox1);
           }
         &lt;/script&gt;
       &lt;/p&gt;
    &lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>