给内容所属标签加 "title" 属性
eg:
<asp:Reapter>
<div class="product_name_descript">
<asp:HyperLink ID="lnkIntroduction" runat="server" NavigateUrl='<%#"MemberShop/ProductDetail.aspx?ProductID="+Eval("ID")+"&ShopCompanyID="+Eval("MemberID") %>'><%#Eval("Introduction")%></asp:HyperLink>
</div>
<asp:Reapter/>
这是一个<asp:Reapter/>标签下 div中的<HyperLink/>标签,其从库里读取 Introduction 属性并显示,在后台代码中设置title属性如下:
HyperLink lnkIntroduction = e.Item.FindControl("lnkIntroduction") as HyperLink;
lnkIntroduction.Attributes.Add("title", theViewMemberProduct.Introduction);