我等了一天了,不知怎么会这样的!
连接的&符号转成网页就变成了&
window.open('../JS/calendar.asp?form=PurchaseShow&field=DataGrid1__ctl4__ctl2'
我想得到!
window.open('../JS/calendar.asp?form=PurchaseShow&field=DataGrid1__ctl4__ctl2'

解决方案 »

  1.   

    别为它担心,浏览器知道&是&,不会影响结果的
      

  2.   

    但是是他输出成了&用Response.Writ()就不会用问题!
    我想要用到后面的变量呀!!
      

  3.   

    you can still get the value in calendar.asp, with 
    Request.QueryString("field")
      

  4.   

    你试试改成
    Attributes["onClick"]="javascript:window.open('../JS/calendar.asp?form=PurchaseShow&field="+myTBname+"','','width=190,height=145')"
      

  5.   

    我试过了成了这样的:
    javascript:window.open('../JS/calendar.asp?form=PurchaseShow&field=DataGrid1__ctl7__ctl2','','width=190,height=145')
      

  6.   

    &#38& # 38这上面合在一起,写在一起就出来这&了.
      

  7.   

    &#38
     这样就可以了.在要写那写上 &#38
      

  8.   

    用Response.Write()可以正确实现你的所有要求呀!不会出现转换问题!在a.aspx中:
    string  a="123";
    string  b="abc";Response.Write("<script language=javascript> window.open('b.aspx?a="+a+"&b="+b+"','','width=190,height=145')</script>");在b.aspx中:
    Label1.Text=Request.QueryString["a"];Label2.Text=Request.QueryString["b"];
      

  9.   

    今天我测试了n次,后来得出一个结果,不用在理会,&amp;这个和&的一样不影响传值!!