我試圖將我的查詢綁定到默認頁面中的兩個項目。我認爲DataBinder.Eval也應該是藍色的。不是。你能告訴我什麼即時通訊代碼在下面的代碼中做錯了。我得到一個sintax錯誤說。Databinding Repeater問題
描述:解析服務此請求所需的資源時發生錯誤。請檢查以下特定的分析錯誤詳細信息並適當修改您的源文件。
解析器錯誤消息:服務器標記不能包含<%...%>結構。
Default.aspx的
<asp:Label ID="lblCommenter" runat="server" Text="<%DataBinder.Eval(Container.DataItem,"CommentersName") %>"></asp:Label>
代碼隱藏
BSComments GetComments = new BSComments();
DataTable DAGetComments = GetComments.GetCommentsByPicIDs(PicId);
Repeater1.DataSource = DAGetComments;
Repeater1.DataBind();