在Gridview中创建超链接以查看实体的详细信息 [英] Creating a Hyperlink in Gridview to Look the Details OF Entity

查看:83
本文介绍了在Gridview中创建超链接以查看实体的详细信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网格视图,其中包含以下详细信息: -



用户名id







现在我想添加一个其他的超链接列,并希望以一种方式编码,它导航我选择的用户配置文件



例如



用户名密码超链接



123 23q showdata

432 resd showdata



当我点击第一个显示数据时它应导航到123个配置文件

当我点击第二个显示数据时它应该导航到432 profile

I have a grid view with following details:-

username id



now i want to add a other hyperlink column and want to code in a fashion that it navigate me to selected user profile

for eg

username password hyperlink

123 23q showdata
432 resd showdata

when i click first show data it should navigate to 123 profile
and when i click second show data it should navigate to 432 profile

推荐答案

TemplateField 添加到 GridView 并在其中定义 HyperLink 。使用 NavigateUrl HyperLink 的属性来声明它将导航到的页面网址,其中个人资料ID为 QueryString 参数。



参考 - 单击gridview内的超链接时,它应重定向到页面,然后在taget页面上,根据ID获取数据 [ ^ ]。
Add a TemplateField to the GridView and define a HyperLink inside that. Use NavigateUrl property of HyperLink to declare the page url which it will navigate to with the profile id as a QueryString parameter.

Refer - On clicking the hyperlink inside gridview, it should redirect to a page and and on the taget page, fetch the data depending upon the ID[^].


这篇关于在Gridview中创建超链接以查看实体的详细信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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