Click here to Skip to main content
12,954,403 members (67,905 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I am displaying a grid view as shown below. Now i want Id to be bound with name field so that i when i click name link it will display details of the employees.

Name Address Age

ABC sdsd 45
XYZ asdsd 34

When i click on ABC or XYZ i must display details. So inorder to do that i must bind (id) on the Name column..How can i do that???
Posted 28-Nov-12 4:33am
Krunal R 28-Nov-12 10:36am
Make name field as Hyperlink
Arjun Menon U.K 28-Nov-12 10:39am
Can u elaborate?? This is the current code i am using
<asp:TemplateField HeaderText="Name">
<asp:LinkButton ID="lnkName" runat="server" Text='<%# Eval("name")%>' >

<asp:TemplateField HeaderText="Address">
<asp:Label ID="lblAge" runat="server" Text='<%# Eval("age")%>'>

<asp:TemplateField HeaderText="Age">
<asp:Label ID="lblAddress" runat="server" Text='<%# Eval("address")%>'>

Krunal R 28-Nov-12 10:40am
I have provided some links below.. Perhaps that will help you..

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Arjun Menon U.K 28-Nov-12 10:43am
Thanks a lot Krunal

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

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 6,524
CHill60 3,490
Maciej Los 3,123
ppolymorphe 2,030
Jochen Arndt 1,975

Advertise | Privacy | Mobile
Web01 | 2.8.170525.1 | Last Updated 28 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100