我想通过js给后台C#程序传值 但是值取不到啊 源代码如下:
前台:aspx
<asp:HiddenField runat="server" id="hell"/>
<asp:Label ID="Label1" runat="server"></asp:Label>
<script type="text/javascript">
var strrr = document.getElementById("hell").value = "hello";
</script>
后台:cs
protected void Page_Load(object sender, EventArgs e)
{
string sstr = Request["hell"];
// Label1.Text= Request.Params["hell"];
//Label1.Text = this.hell.Value;
if (sstr == "hello")
Label1.Text = "get hello";
else
Label1.Text = "no hello";
}