首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

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

2012-08-01 
新手求助!!!页面间传值问题~我想实现这样一功能求教!!两页面:web1,web2web1中一Gridview控件:列Id,Name,B

新手求助!!!页面间传值问题~
我想实现这样一功能求教!!
两页面: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> 

热点排行