zoukankan      html  css  js  c++  java
  • asp.net 前台 对列进行加工(用DataBinder.Eval 不要用Bind)

     <asp:TemplateField HeaderText="稿件">
                                                    <EditItemTemplate>
                                                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Eval("[sServerVirtualityPathHttpRemote,sOppositePath,sSmallPhotoFileName]") %>'></asp:TextBox>
                                                    </EditItemTemplate>
                                                    <ItemStyle Font-Size="9pt" Width="8%" HorizontalAlign="Center" VerticalAlign="Middle" />
                                                    <HeaderStyle Font-Size="9pt" Width="8%" HorizontalAlign="Center" VerticalAlign="Middle" />
                                                    <ItemTemplate>
                                                        <table style="margin-top: 0px; margin-left: 0px">
                                                            <tr>
                                                                <td style="height: 58px">
                                                                    <a href='<%# string.Format( "PhotoInformation.aspx?ImageID={0}&sType={1}&sImage=1", DataBinder.Eval(Container.DataItem, "sGuidID"),DataBinder.Eval(Container.DataItem, "sGuidIDtBaseDraftType")) %>'
                                                                        target="_blank">
                                                                        <asp:Image ID="Image1" runat="server" ImageUrl='<%# string.Format("{0}/{1}/small/{2}",DataBinder.Eval(Container.DataItem, "sServerVirtualityPathHttpRemote"),DataBinder.Eval(Container.DataItem, "sOppositePath"),DataBinder.Eval(Container.DataItem, "sSmallPhotoFileName")) %>'
                                                                            Height="53px" Width="60px" /><asp:HyperLink ID="HyperLink_txt" runat="server" Visible="False"
                                                                                Target="_blank">HyperLink</asp:HyperLink></td>
                                                            </tr>
                                                        </table>
                                                    </ItemTemplate>
                                                </asp:TemplateField>

  • 相关阅读:
    mysql-connector-java(6.0以上)的时差问题
    Mysql中的Date转换
    Intellij idea 告警:'while' statement cannot complete without throwing an exception
    JavaScript数组的操作
    Intellij idea 告警:URI is not registered (Settings | Languages & Frameworks | Schemas and DTDs)
    【网络文摘】2016年里做前端是怎样一种体验
    【JavaScript Demo】回到顶部功能实现
    【JavaScript 插件】实现图片倒影效果
    【读书笔记《Bootstrap 实战》】6.单页营销网站
    【读书笔记《Bootstrap 实战》】5.电子商务网站
  • 原文地址:https://www.cnblogs.com/zhwl/p/2434416.html
Copyright © 2011-2022 走看看