从RowCommand获取数据

编程入门 行业动态 更新时间:2024-10-23 21:40:12
本文介绍了从RowCommand获取数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

Hello Guy's, 我有一个显示产品版本的网格,并有一些链接按钮,例如编辑,删除,预览等. 在单击编辑按钮时,我想获取产品ID和版本ID并重定向到某些xyz.aspx页面,以便可以编辑产品详细信息. 这是我的网格的外观.

Hello Guy''s, I have a grid which shows product version''s and have a few link buttons like edit, delete, preview etc. On click of edit button i want to get the Product ID and Version ID and redirect to some xyz.aspx page wher the product details can be edited. Here is how my Grid looks.

<asp:TemplateField HeaderText = "Edit"> <ItemTemplate> <asp:LinkButton ID="Edit" runat="server" CommandName="Add" >"Edit"</asp:LinkButton> <ItemTemplate>

这就是我在网格内定义编辑链接"按钮的方式. 单击链接按钮,我正在gridview_RowCommand中进行跟踪. 在这里我想获取VersionID和ProductID并重定向到另一个页面. 请帮帮我. 我是编码的新手.我做了一些谷歌搜索,但没有解决方案对我有帮助.

This is how i have defined my Edit Link button inside the grid. Click of link button i am tracking in gridview_RowCommand. Here i want to get the VersionID and ProductID and Redirect to another page. Please help me. I am Real New to Coding. I did a bit of google but non of the solutions are helping me.

推荐答案

在链接按钮中定义命令参数 在row_command事件处理程序中,您可以检索命令参数 使用response.redirect转到另一页并将参数作为查询字符串传递. define command arguments in your link button in row_command event handeler you can retrieve your command arguments use response.redirect to go to another page and pass the arguments as query string.

更多推荐

从RowCommand获取数据

本文发布于:2023-11-26 21:03:46,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1635190.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:数据   RowCommand

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!