单击网格视图行链接时,在弹出窗口中打开其他网页 [英] open other web page in a popup when click grid view row link

查看:92
本文介绍了单击网格视图行链接时,在弹出窗口中打开其他网页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

先生,您好,我有一个页面显示网格视图和网格视图有一个



链接按钮

我必须点击那个发送该记录ID的链接按钮然后



i必须显示其他显示表格字段的网页



该ID和该页面应该作为弹出窗口打开









提前感谢

解决方案



此链接描述了你想要的,只需传递你的 ID 到页面网址 querstring

jQuery弹出控件

< script type =   text / javascript> 
function GoToNextPage(id){


.braviPopUp(' 测试标题!'' popup.aspx ?id =' + id, 600 400 );
}
< / script>



使用此javascript函数调用弹出功能:



从每个gridview行调用函数,如:

 <   asp:GridView     ID   =  GridView1    runat   = 服务器 >  
< >
< asp:TemplateField HeaderText = 记录故障单 >
< ItemTemplate >
< span class =code-keyword>< asp:LinkBut​​ton ID = btnview runat = 服务器 文字 = 查看详细信息 OnClientClick =' < ;% 返回GoToNextPage( + Eval( ID)+ %>' > ;
< / asp:LinkBut​​ton >
< / ItemTemplate >
< / asp:TemplateField < span class =code-keyword>>
< / Columns >
< / asp: GridView >


以下链接可以帮助您



http://www.dotnetpools.com/Article/ArticleDetiail/?articleId= 335& title = Code-To-Display-Gridview-Selected-Row-Value-in-Modalpopupextender-Using-C#-in-Asp.net [ ^ ]



或者您可以使用类似的东西



 e.Row.Attributes.Add(  onclick String  .Format(  javascript:


hello sir, i have a page that show a grid view and grid view have a

link button
and i have to click that link button that send id of that record then

i have to show other web page which show table's field according to

that id and that page should b open as a popup




thanks in advance

解决方案

hi,
this link describes what you want, just pass your ID to the page url as querstring
jQuery popup control

<script type="text/javascript">
        function GoToNextPage(id) {


.braviPopUp('testing title!', 'popup.aspx?id=' + id, 600, 400); } </script>


use this javascript function to call the popup function:

call the function from each gridview row like:

<asp:GridView ID="GridView1" runat="server">
         <Columns>
             <asp:TemplateField HeaderText="Logged Ticket">
             <ItemTemplate>
             <asp:LinkButton ID=btnview runat=server Text="View Detail" OnClientClick='<%# "return GoToNextPage("+ Eval("ID")+")" %>'>
             </asp:LinkButton>
             </ItemTemplate>
             </asp:TemplateField>
          </Columns>
      </asp:GridView>


Below link may help you

http://www.dotnetpools.com/Article/ArticleDetiail/?articleId=335&title=Code-To-Display-Gridview-Selected-Row-Value-in-Modalpopupextender-Using-C#-in-Asp.net[^]

or you can use something like this

e.Row.Attributes.Add("onclick", String.Format("javascript:


这篇关于单击网格视图行链接时,在弹出窗口中打开其他网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆