从数据在页面显示不解析

来源:互联网 发布:通达信看盘软件 编辑:程序博客网 时间:2024/05/16 17:09
                            <asp:Repeater ID="Rptnewstop" runat="server">
                                <ItemTemplate>
                                    <h2>
                                        <a target="_blank" href='<%=url %>/<%#new YJ.BLL.Brand().GetBrandById(new YJ.BLL.Article().GetArticleById(int.Parse(Eval("i_Id").ToString())).i_Bid).vc_Name %>/<%#Eval("i_Id") %>.html'
                                            title='<%#Eval("vc_Title") %>' >
                                            <%#YJ.CommonLib.CutString.GetSubStringsNoHtmlIndent(Eval("vc_Title").ToString(),18) %></a></h2>
                                    <p>
                                        <%#YJ.CommonLib.CutString.GetSubStringsNoHtmlIndent(Server.HtmlDecode(Eval("vc_Content").ToString()),70) %></p>
                                </ItemTemplate>

                            </asp:Repeater>


在读取的数据前加:Server.HtmlDecode

0 0