zoukankan      html  css  js  c++  java
  • 前端获取后台数据,前端根据获取的数据判断Repeater列是否显示或隐藏

    aspx.cs

    public bool ShowInside_model = True;

    aspx

    <script type="text/javascript">

    $(function() {
                //判断权限
                var ShowInside_model = "<%=ShowInside_model %>";
                if(ShowInside_model.toString() == "True")
                {
                    $('[id=tdinside_model]').hide();
                    $('[id=tdinside_model2]').hide();
                }

        else

        {

          $('[id=tdinside_model]').show();
                    $('[id=tdinside_model2]').show();

        }

            });

    </script>

    <body>

      <table class="GridBarChi" style="1780px; " id="tb_chi" >
                <tr>
                    <th style="150px;" id="tdinside_model">
                       内部型号
                    </th>
                </tr>
                <asp:Repeater ID="Repeater1" runat="server"
                    onitemdatabound="Repeater1_ItemDataBound">
                    <ItemTemplate>
                        <tr >
                            <td id="tdinside_model2">
                                <asp:Label ID="inside_model" runat="server" Text='<%#Eval("inside_model")%>'></asp:Label>
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
            </table>

    </body>

  • 相关阅读:
    推荐一个不错的在线Linux学习平台(免安装系统)
    C#基本语法知识
    GDI+ 使用LockBits和指针加快处理速度
    C#对图像像素处理的三种方式
    [转]video4linux(v4l)使用摄像头的实例基础教程与体会
    Eclipse Qt开发环境的建立
    c#图像处理基础
    [转]超酷的图像效果
    Qt开发环境的建立
    C++模版全掌握(实例)
  • 原文地址:https://www.cnblogs.com/lengv10/p/3652273.html
Copyright © 2011-2022 走看看