admin 管理员组

文章数量: 1184232


2024年3月13日发(作者:while的5种用法及例句)

页面之间传递参数的几种方法

第一种方法:通过URL链接地址传递

:

protected void Button1_Click(object sender, EventArgs e)

{

ct("?username=honge");

}

:

string username = tring["username"];

这样可以得到参数值。

第二种方法:通过post方式

Text="Button" />

ring username = ["receive"];

第三种方法:通过session

:

protected void Button1_Click(object sender, EventArgs e)

{

Session["username"] = "honge";

ct("");

}


本文标签: 传递 方法 链接 参数