当用户登录时,我想向他们展示他们当前记录(请求)的列表。我的 asp.net 是这样的——
<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>
后面的代码是:
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();
我看到了一个不错的课程标题列表,但我想要的是让这些标题导航到另一个页面,使用 request_id 作为参数。如何将 HyperLink 类合并到其中?