方法1:
  C#
  Label1.Text = Request.Form["txtName"].ToString();
  vb.net
  Request.Form("txtName").ToString()
  方法2:
  C#
  System.Collections.Specialized.NameValueCollection nc = new System.Collections.Specialized.NameValueCollection(Request.Form);Label1.Text = nc.GetValues("txtName")[0].ToString();
  注: "txtName"为Html控件的"name"属性值
  以上代码在Microsoft Visual Studio 2008下调试通过

相关文章:

  • 2022-01-06
  • 2021-09-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-15
猜你喜欢
  • 2022-02-24
  • 2022-12-23
  • 2022-01-23
  • 2021-07-30
  • 2021-10-21
  • 2021-10-25
  • 2022-12-23
相关资源
相似解决方案