更新时间:2023-02-11 22:29:35
代码背后:
ScriptManager.RegisterStartupScript(this, this.GetType(), "", "urFunction('urValHere');", true);
:
function urFunction(urParam) { //do what u want here //use urParam }
从后面的代码设置javascript变量的值(C#)
使用JavaScript来设置隐藏字段的值,然后从服务器端的C#代码访问值