0
我需要從Eval函數接收數據進行比較,所以我試過這個,但是無法從Eval或Bind接收任何東西。如何獲取評估值在ItemTemplate中的字符串
<ItemTemplate>
<%
string auc_id = ((string)Eval("Item_BelongToAuction"));
Guid id = Guid.Empty;
Guid.TryParse(auc_id, out id);
try
{
using (ModeloEntities modelo = new ModeloEntities())
{
var auction_name = (from auctions in modelo.Auctions
where auctions.Auction_ID == id
select auctions).First();
Response.Write(auction_name.Auction_Name);
}
}
catch { }
%>
</ItemTemplate>