Is there a simple way to transfer data between client and server?
<p>I use HiddenField1 control to transfer data between client and server. First I click Button1,then click Button2, the text of Button2 will be set as "cc" 
but I think it's too complex, is there a simple way? Thanks!</p>

<pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %&gt;

&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;

&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head runat="server"&gt;
    &lt;title&gt;&lt;/title&gt;
    &lt;script src="jquery1.4.2.min.js" type="text/javascript"&gt;&lt;/script&gt;

    &lt;script type="text/javascript"&gt;
        $(function () {
            $("#Button1").click(function () {
                $("#HiddenField1").val("bb");
            });
        });
    &lt;/script&gt;
&lt;/head&gt;

&lt;body&gt;
    &lt;form id="form1" runat="server"&gt;
    &lt;div&gt;    
        &lt;asp:HiddenField ID="HiddenField1" runat="server" ClientIDMode="Static" /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        &lt;input id="Button1" type="button" value="button" /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
        &lt;asp:Button ID="Button2" runat="server" onclick="Button2_Click" Text="Button" /&gt;
    &lt;/div&gt;
    &lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;



using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void Button2_Click(object sender, EventArgs e)
    {
        Button2.Text = HiddenField1.Value;
    }

}
</code></pre>
