你必須命名框架
<frameset>
<frame name="fra1" id=fra1/>
<frame name="fra2" id=fra2/>
</frameset>如果只是要跳轉頁面,不要提交到服務器,不智
可用datagrid 的databound事件
webcontrol.attribute["onclick"]="<script>parent.fra2.location.href='viewtop.aspx?id="+YouselfBindValue+"'</script>"

解决方案 »

  1.   

    webcontrol.Attribute.Add("onclick","window.open('viewtop.aspx','down')";
      

  2.   

    Response.Write("<script language=javascript>parent.top.location='viewtop.aspx?id=" + DataGrid1.SelectedItem.Cells(2).Text + "';</script>")
    少分号
      

  3.   

    谢谢大家的回复!但是我还有一点不了解webcontrol.Attribute是什么意思?直接写
    webcontrol.attribute["onclick"]="<script>parent.fra2.location.href='viewtop.aspx?id="+YouselfBindValue+"'</script>"这样是错的
    把webcontrol改成DataGrid1也不对…………
      

  4.   

    webcontrol是你Datgrid1里的那个选择按钮