属性与方法的使用

lzzyxiaopeng 2010-04-22 02:18:28
System.Web.HttpRequest.QueryString”是“属性”,但此处被当做“方法”来使用

源错误:


if (!IsPostBack)
{
String a = Request.QueryString("id");

}

我在HyperLink里面绑定了数据库ID
"hthyxg.aspx?id="+Eval("u_id")

用QueryString获取不到 请那位高手指点下
感谢
...全文
38 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
wuyq11 2010-04-22
  • 打赏
  • 举报
回复
Dim a As String = If(Request.QueryString("id") Is Nothing, "", Request.QueryString("id").ToString())
捷哥1999 2010-04-22
  • 打赏
  • 举报
回复
估计你是C#程序,看看2楼的方法,C#的属性使用[]访问的。
threenewbee 2010-04-22
  • 打赏
  • 举报
回复
C#版本:
if (!IsPostBack)
{
string a = Request.QueryString["id"];
}
threenewbee 2010-04-22
  • 打赏
  • 举报
回复
VB还是C#?
If Not IsPostBack Then
Dim a As String = Request.QueryString("id")
End If

16,554

社区成员

发帖
与我相关
我的任务
社区描述
VB技术相关讨论,主要为经典vb,即VB6.0
社区管理员
  • VB.NET
  • 水哥阿乐
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧