如何在aspx文件里取到***.aspx?id=100这个id的值我只知道asp的,request

解决方案 »

  1.   

    我在aspx里写纯asp教本,没用到.net的内容,为什么不能执行啊,
      

  2.   

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

  3.   

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

  4.   

    int a=(int)Request["id"];--->搞错了Request["id"]是string型
      

  5.   

    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title></title>
    </head>
    <script language=javascript>
    location.href = 'transNext.asp';
    </script>
    <body></body></html>
    以上是我的简单代码,如果说我要在href后面跟取到的id值,应该怎么写呢??
      

  6.   

    int id=Convert.ToInt32(Request.QueryString["id"]);
      

  7.   


    location.href = 'transNext.asp?+id';
      

  8.   

    晕.好快int idd=Convert.ToInt32(Request["id"]);