Databind on Linkbutton within GridView

Joined
Mar 30, 2009
Messages
2
Reaction score
0
Within my gridview, I have a linkbutton...

<asp:LinkButton ID="lbDate" runat="server" Text="<%# Eval( "Name")%>" CommandName="View" CommandArgument="<%# Container.DataItemIndex %>" />

The Command Argument holds my DataKeyValue which in this case is the 'Event ID'. I know that when the text field is left blank, the command arguement is displayed as the text. However, I don't want the linkbutton to display the Event ID. Instead, there is a date associated with each Event ID. I would like that date to appear as the text of the link button.

How can this be accomplished? The Eval command in the above Text field gives an error..

Thanks..
 
Joined
Mar 30, 2009
Messages
2
Reaction score
0
Nevermind..

I figured it out.. I just munipulated the text value using RowDataBound..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,992
Messages
2,570,220
Members
46,805
Latest member
ClydeHeld1

Latest Threads

Top