我的index.aspx的一个按钮btn_bool
{
    string istrue;
    string filepath="bookshow.aspx?id=25"
    istrue=??               
    //这里得到"bookshow.aspx?id=25"网面的值 也就是false或true
}bookshow.aspx
load

   string id=request.QueryString["id"].tostring
   if(id!="100")
   {
      response.write("true");
   }
   else
   {
      response.write("false");
   }
}谢谢
PS:bookshow.aspx页面是没有任何代码的

解决方案 »

  1.   

    {
        string istrue;
        string filepath="bookshow.aspx?id=25"
        if( Session["IsTrue"] !=null)
    {
            string isture = Session["isTrue"].ToString();
    }
        istrue=??               
        //这里得到"bookshow.aspx?id=25"网面的值 也就是false或true
    }bookshow.aspx
    load

       string id=request.QueryString["id"].tostring
       if(id!="100")
       {
          Session["IsTrue"] = "true";   }
       else
       {
          Session["IsTrue"] = "false";   
       }
    }
      

  2.   

    不能用Session[]也不能用Cookie
    是要记取这个网页返回的值
      

  3.   

    其实我上面的bookshop.aspx是生成一个xml文件的
    然后我的index.aspx根据这个xml做相应的事情
      

  4.   

    如果你要在aa.aspx取bookshow.aspx输出的true/false在aa.aspx里
    引用 using System.Net; using System.IO;
    WebRequest  request = WebRequest.Create("bookshow.aspx");
    WebResponse response = request.GetResponse();using(Stream resStream = response.GetResponseStream())
    {
    using(StreamReader sr = new StreamReader(resStream, System.Text.Encoding.UTF8))
    {
    Response.Write(sr.ReadToEnd()));//此为你要取bookshow.aspx输出的true/false
    }
    }
      

  5.   

    document.body.innerHTML 么?呵呵,第二个页面前面声明有大堆代码吧? 相对于你的两个单词来说
      

  6.   

    在跨域时使用ajax会出现安全提示
    我碰到过;使用的上述方法实现的
    不知可否帮上楼主
      

  7.   

    我用
    Response.Write("<?xml version=\"1.0\" encoding=\"utf-8\" ?>");
                    Response.Write("<root>");
                    Response.Write("<IsUpdateOK>");
                    Response.Write("1");
                    Response.Write("</IsUpdateOK>");
                    Response.Write("</root>");
    这种方法得到返回值不知道有没有更高明的
      

  8.   

    方法很多,下面是常见的2个
    http://dotnet.aspx.cc/article/4ae836f8-ccb4-4bef-90b1-25bb1a5e6433/read.aspx
    http://dotnet.aspx.cc/article/0a6660ce-4138-41ef-b882-15db65564709/read.aspx
      

  9.   

    路过------------------------
    http://fenglin.xland.cn
    ------------------------
      

  10.   

    这种做法,我的实现是 第一种,ajax去查,感觉这种方法不错