This is a really simple demonstration:
aspx/markup; this will set the value of your hidden field as you type
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:HiddenField ID="HiddenField1" runat="server" />
<asp:Button ID="Button1" runat="server" Text="Button" />
</div>
</form>
<script>
document.getElementById('<%= TextBox1.UniqueID %>').onkeyup = function (evt) {
document.getElementById('<%= HiddenField1.UniqueID %>').value = document.getElementById('<%= TextBox1.UniqueID %>').value;
}
</script>
Code behind (.cs)
protected void Page_Load(object sender, EventArgs e)
{
Response.Write(HiddenField1.Value);
}