日期:2014-05-18  浏览次数:20440 次

Repeater绑定数据的问题
<asp:Repeater   ID= "rpCompany "   runat= "server "   DataSourceID= "SqlDataSource1 ">
<ItemTemplate>
<asp:HyperLink   ID= "hlRightTitle "   Target= "_blank "   CssClass= "company "   runat= "server "   NavigateUrl= 'http:// <%#   Eval( "user_name ")   %> .myeeig.cn '> <%#   Eval( "Qymc ")   %>
</asp:HyperLink>
</ItemTemplate>
</asp:Repeater>

但结果是
<a   id= "rpCompany_ctl00_hlRightTitle "   class= "company "   href= "http://&lt;%#%20Eval(&quot;user_name&quot;)%20%> .myeeig.cn "   target= "_blank "> xxx公司   </a>

该怎么做啊

------解决方案--------------------
<%#DataBinder.Eval(Container.DataItem, "PID ")%>
------解决方案--------------------
使用 <a> </a>