<ItemTemplate>
<HLControls:Image id="imgBlocked"
</HLControls:Image>
</ItemTemplate>
<ItemTemplate>
<img src="<%=Request.ApplicationPath%>/images/warning.gif" onclick='javascript:var productnotes="<%#DataBinder.Eval(Container.DataItem,"ProductNote")%>"; alert(productnotes);'
style='cursor:hand;display:<%#DataBinder.Eval(Container.DataItem,"ProductNote")==""?"none":""%>'/>
</ItemTemplate>
<FooterTemplate>
<IMG style="CURSOR: hand" onclick=javascript:ShowReference(); src="<%=Request.ApplicationPath%>/images/reference.gif">
</FooterTemplate>
</asp:TemplateColumn>
博客展示了ASP中模板列的相关代码。包含使用HLControls:Image根据数据项显示图片,以及在img标签中通过JavaScript实现点击弹出产品备注信息,还在页脚模板中使用IMG标签并绑定JavaScript函数。
227

被折叠的 条评论
为什么被折叠?



