dim   mjid as integer = Grid1.SelectedItem.Cells(0).Text
        Response.Write("<script   language='javascript'>var   a=window.open('mjtk.aspx?mjid=" + mjid + "',   'newwindow',   'height=200,   width=400,   top=120,   left=285,   toolbar=no,   menubar=no,   scrollbars=no,resizable=no,location=no');window.location.href=window.location.href;</script>")这句在mjtk.aspx 怎么取不到值 mjid

解决方案 »

  1.   

    1.  Dim mjid As Integer = Grid1.SelectedItem.Cells(0).Text 
    先在后面加个alert(mjid),运行看看. 2.在mjtk.aspx设个断点看,运行看有没有走到这步. 3.再看js运行后生成的代码,看页面左下角.有没有报错.
      

  2.   

    搞拈
          Response.Write(" <script  language='javascript'>var  a=window.open('mjtk.aspx?mjid=" & mjid + &',  'newwindow',  'height=200,  width=400,  top=120,  left=285,  toolbar=no,  menubar=no,  scrollbars=no,resizable=no,location=no');window.location.href=window.location.href; </script>") 
    vb用&
    谢谢各位
      

  3.   

    dim  mjid as integer = Grid1.SelectedItem.Cells(0).Text 
    mjid的值是由这句来的,是javascript问题吗?
    取得位置不正确吧?
    先看看Grid1.SelectedItem是什么,怀疑为null