if not isempty(request("page")) then
      CurrentPage=cint(request("page"))
   else
      CurrentPage=1
   end if
上面一段代码总是错误提示“类型不匹配”,请大家看看是怎么回事,应该怎么改?谢谢了!

解决方案 »

  1.   

    VB.NET不会...
    C#中先判断request("page") 是否为null
    if (Request["page"] != null && Reqeust["page"].ToString() != string.Empty)
    {
         CurrentPage=intParse(Request["page"].ToString());
    }
      

  2.   

    猪头对:
    原因:
    cint()方法里面接收string类型的
    Request("page")类型为:object的,需要转化
      

  3.   

    if request.querystring("page")="" then
          CurrentPage=cint(request.querystring("page"))
       else
          CurrentPage=1
       end if
      

  4.   

    request.querystring  或者request.form    不可以直接用request