且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何读取asp.net页面传递的参数,使用C#?

更新时间:2023-02-08 08:19:58

使用您的样本网址:

string id = Request.QueryString["id"];

string nam = Request.QueryString["nam"];



阅读有关的 MSDN上的Request.QueryString。你可能想在 ID 值转换为int。

Read about Request.QueryString on MSDN. You probably want to convert the id value to an int.