当前位置: 代码迷 >> ASP.NET >> 新手!页面间传值有关问题
  详细解决方案

新手!页面间传值有关问题

热度:6480   发布时间:2013-02-25 00:00:00.0
新手求助!!!页面间传值问题~
我想实现这样一功能求教!!
两页面:web1,web2;
web1中一Gridview控件:列Id,Name,Button按钮;

<asp:Button ID="Buttonid" runat="server" Text="ID" OnClientClick="return vv()"/>

function vv() 
  {  
  var result=showModalDialog('RepleDetailed.aspx','RepleDetailed','dialogWidth:500px;dialogHeight:400px;center:yes;help:no;resizable:no;status:no');  
  } 

点击按钮跳到网页对话框web2并传以Gridview列的Id值;
web2接收Id








------解决方案--------------------------------------------------------
C# code
<asp:Button ID="Buttonid" runat="server" Text="ID" OnClientClick='vv(<%#Eval("id")%>)'/>function vv(val)    {     var result=showModalDialog('RepleDetailed.aspx?id='+val,'RepleDetailed','dialogWidth:500px;dialogHeight:400px;center:yes;help:no;resizable:no;status:no');     }
------解决方案--------------------------------------------------------
querystring
------解决方案--------------------------------------------------------
C# code
function vv(id) {            var str = window.showModalDialog("RepleDetailed.aspx?id="+id+"&tmp="+new Date()+"", "RepleDetailed", "dialogWidth:500px;dialogHeight:400px;center:yes;help:no;resizable:no;status:no");        }<a href="#" onclick='vv(<%#Eval("ID") %>)'>查看</a>
  相关解决方案