Response.Write( " <script>window.parent.location='checkq.aspx?qinggid =?'</script> " );想在问号 的地方传入 date变量,怎么个写法,或其他方式,谢谢了 

解决方案 »

  1. string date="";
    Response.Write( " <script>window.parent.location='checkq.aspx?qinggid ="+date+"'</script> " );
      

  2. string date="";
    Response.Write( " <script>window.parent.location='checkq.aspx?qinggid ="+date+"'</script> " );
      

  3. string date="";
    Response.Write( " <script>window.parent.location='checkq.aspx?qinggid ="+date+"'</script> " );
      

  4. DateTime dt = ;
    string url="checkq.aspx?qinggid='"+dt+"'";
    Response.Write( " <script>window.parent.location=url</script> " );
      

  5. string script=string.Format("<script>window.parent.location='checkq.aspx?qinggid {0}'</script>",date)
    Response.Write(script);
      

类似问题 »