如何获取gridview的单元格值并将其显示在onclientclick上的另一个页面中 [英] How to get cell value of gridview and display it in another page onclientclick
问题描述
hi
我有两页asp.net 1. default.aspx 2. popup.aspx和sqlserver数据库
i有10列的网格视图和带有imagebutton1的模板字段
i首先点击imagebutton1:运行我的函数OpenPopup()
< script type =text / javascript >
函数OpenPopup(){
window.open(popup.aspx,List,toolbar = no,location = no,status = yes,menubar = no,scrollbars =是的,resizable = no,width = 500,height = 500,left = 430,top = 100);
返回false;
}
< / script>
和secod:cell [2]和cell [6]的值] popup.aspx标签中的网格视图显示
我该怎么做
谢谢
< b>我尝试了什么:
如何获取gridview的单元格值并将其显示在另一个页面onclientclick
使用查询字符串 [ ^ ]将值从另一页传递给另一页。
参考此使用JavaScript点击时获取ASP.Net GridView SelectedRow [ ^ ]从cur获得价值租一排girdview。
使用Request.QueryString
获取值
< pre lang =C#> label1.Text + = Request.QueryString [ YourKey];
hi
I have tow pages asp.net 1. default.aspx 2. popup.aspx with sqlserver database
i have grid view with 10 columns and Template Field with imagebutton1
i want when I click on imagebutton1 first: run my function OpenPopup()
<script type="text/javascript"> function OpenPopup() { window.open("popup.aspx", "List", "toolbar=no, location=no,status=yes,menubar=no,scrollbars=yes,resizable=no, width=500,height=500,left=430,top=100"); return false; } </script>
and secod: value of cell[2] and cell[6] of grid view display in labels on popup.aspx
how can i do that
thanks
What I have tried:
how to get cell value of gridview and display it in another page onclientclick
use Query string [^] to pass the values from one page another .
refer this Get ASP.Net GridView SelectedRow when clicked using JavaScript[^] for getting value from the current row of girdview.
usingRequest.QueryString
get the values
label1.Text += Request.QueryString["YourKey"];
这篇关于如何获取gridview的单元格值并将其显示在onclientclick上的另一个页面中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!