How to change values of ListView elements in Codebehind

Posted by Viredae on Stack Overflow See other posts from Stack Overflow or by Viredae
Published on 2010-04-04T12:00:13Z Indexed on 2010/04/04 12:03 UTC
Read the original article Hit count: 511

Filed under:
|

Hello,

I'm trying to create a table with Listview and one of the fields I'm using is supposed to show a hyperlink to a more detailed view of the data shown, how I want to do that is by using FindControl on the ID of that item and then changing the value into a hyperlink of the detailed view page with a querystring attached, the problem is that I have no idea how to re-insert that data back into the listview field, which looks something like this:

                    <ItemTemplate>
                    <td>
                    <asp:Label ID="ViewLinkLabel" runat="server" 
                        Text='[insert Link Here]' />
                    </td>
                    </ItemTemplate>

Please bear in mind that I'm still an amateur in ASP.net, and if any of this seems too convoluted when there's a much easier to do this that I don't know about.

Thank you

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about codebehind