• 前端获取后台数据,前端根据获取的数据判断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>

  • 相关阅读:
    抓取到的网页写入数据库后是乱码的解决方法
    关于SecureCRT v7.0.2.418 安装、破解和修改
    负数的除法和取模运算(Python 2.7和C的比较)
    单模式匹配匹配算法
    Python解析网页工具:PyQuery
    asp.net json,对象,字符串的相互转换
    asp.net 后台 get,post请求
    查看局域网内所有IP
    MSSql性能优化
    js中对象复制以及apply方法的使用
  • 原文地址:https://www.cnblogs.com/lengv10/p/3652273.html
Copyright © 2020-2023  润新知