Click here to Skip to main content
15,890,185 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted
Comments
Abhishek Pant 7-Jun-14 1:38am    
pass username to javascript to navigate with target blank or use linkbutton to show modal popup displaying details in the same page and pass username using command argument or find commandname in row events.

1 solution

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[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900