When a user logs in, I would like to present them with a list of their current records (requests). My asp.net is this-
<asp:ListView ID="MySavedRequestsListView" runat="server" GroupItemCount="5">
<LayoutTemplate>
<table runat="server" id="table1">
<tr runat="server" id="groupPlaceholder">
</tr>
</table>
</LayoutTemplate>
<GroupTemplate>
<tr runat="server" id="tableRow">
<td runat="server" id="itemPlaceholder" />
</tr>
</GroupTemplate>
<ItemTemplate>
<tr id="TrUserRequest" runat="server">
<td id="TdTitle" runat="server">
<asp:Label ID="TitleLabel" runat="server" Text='<%#Eval("title") %>'
</td>
</tr>
</ItemTemplate>
</asp:ListView>
and code behind is:
var UserRequests = (from r in context.course_requests
where r.requestor_userid == access.username
orderby r.course_title
select new { r.request_id,
r.title}).ToList();
MySavedRequestsListView.DataSource = UserRequests;
MySavedRequestsListView.DataBind();
I am presented with a nice list of course titles, but what I want is for those titles to navigate to another page, using the request_id as the parameter. How can I incorporate the HyperLink class into this?
You can use a HyperLink
or a simple
<a>tag