当前位置:编程学习 > C#/ASP.NET >>

属性与方法的使用

System.Web.HttpRequest.QueryString”是“属性”,但此处被当做“方法”来使用

源错误:

 
         if (!IsPostBack)
         {
             String a = Request.QueryString("id");
 
         }
 
我在HyperLink里面绑定了数据库ID
"hthyxg.aspx?id="+Eval("u_id")

 用QueryString获取不到 请那位高手指点下
感谢 --------------------编程问答-------------------- VB还是C#?
If Not IsPostBack Then
    Dim a As String = Request.QueryString("id")
End If --------------------编程问答-------------------- C#版本:
if (!IsPostBack)
{
    string a = Request.QueryString["id"];  
}
--------------------编程问答-------------------- 估计你是C#程序,看看2楼的方法,C#的属性使用[]访问的。 --------------------编程问答-------------------- Dim a As String = If(Request.QueryString("id") Is Nothing, "", Request.QueryString("id").ToString())
补充:.NET技术 ,  VB.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,