单击gridview行以在另一个网页中打开查询? [英] Click gridview row to open query in another webpage?

查看:65
本文介绍了单击gridview行以在另一个网页中打开查询?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我正在尝试寻找以下逻辑的示例:



我有gridview,其中有一个标记为'Name'的列,其中显示了name参数的实体。我希望能够点击其中一个实体(gridview行),它会将我重定向到一个网页,其中包含有关所选名称实体的详细信息。



非常感谢任何帮助。

谢谢

Hello,

I am trying to look for an example for the following logic explained below:

I have gridview which has a column labeled as 'Name', where is displays name parameter's entities. I would like to be able to click on one of the entities (gridview row) and it would redirect me to a web page that holds detailed information on that selected name entity.

Any help would be very much appreciated.
Thank you

推荐答案

参考



1. ASP.NET:使用Twitter Bootstrap在模态弹出窗口中显示GridView行详细信息 [ ^ ]

2. 使用可选择的主GridView和详细信息DetailView(C#)的主/细节[ ^ ]

3. GridView with DetailsView [ ^ ]
Refer

1. ASP.NET: Display GridView Row Details in Modal Popup using Twitter Bootstrap[^]
2. Master/Detail Using a Selectable Master GridView with a Details DetailView (C#)[^]
3. GridView with DetailsView[^]


使用网格查看模板编辑如下,然后我们可以将用户ID作为查询字符串传递,在下一页你需要从查询字符串中获取用户ID并显示具有相应id的用户的详细信息



Use grid view template editing as following and then we can pass user id as query string, at the next page u need to get the user id from query string and display details of user with corresponding id

<asp:GridView ID="GridView1" runat="server" DataKeyNames="UserId"

                AutoGenerateColumns="False" 

                CssClass="grid" Width="100%" CellPadding="2">
            <Columns>
                <asp:BoundField DataField="UserId" HeaderText="slno" Visible="False" />
                <asp:TemplateField HeaderText="User Name">
                    <ItemTemplate>
                        <asp:Label ID="Label2" runat="server" Text='<%# Bind("TaskName") %>' CssClass="grid"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>

                <asp:HyperLinkField  HeaderText="View details"

                    DataNavigateUrlFields="UserId"

                    DataNavigateUrlFormatString="~/Detailspage.aspx?id={0}"

                     DataTextField="view"

                     ItemStyle-Wrap="true" >
<ItemStyle Wrap="True" Width="110px"></ItemStyle>
            </asp:HyperLinkField>




</Columns>
  </asp:GridView>


这篇关于单击gridview行以在另一个网页中打开查询?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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