zoukankan      html  css  js  c++  java
  • ASP.NET中$#=的用法

    <%$     %>

     获取App_GlobalResources中message.resx文件中的B0011对应的字符串                                                        <asp:Button ID="btnExecute" runat="server" CssClass="pressedbutton" Font-Bold="True" Text="<%$ Resources:Message, B0011 %>" />

     获取App_LocalResource中***.aspx.resx文件中的ShoriYm对应的字符串                                                        <asp:Label ID="lblShoriYm" runat="server" CssClass="label_02" Text="<%$ Resources:ShoriYm%>" ></asp:Label></td>

    获取web.config文件中的数据库连接字符串    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$connectionStrings:Pubs %>" SelectCommand="select * from catalog"></asp:SqlDataSource>

    <%#     %>

    数据绑定 

    <asp:Label ID="lblId" runat="server" Text='<%#Eval("MenuBig_Id") %>' Visible="false"></asp:Label>       

    <%=     %>

    是在客户端获取服务器端的变量,后台往前台传值
    <asp:Label ID="Label2" runat="server" CssClass="label"  Width="255px"><%=testStr%></asp:Label>

  • 相关阅读:
    高斯核函数的代码体现
    程序编译
    DoH
    随笔1
    获取节点值的方式
    DOM解析XML
    URLConnection发送请求,并接收数据
    myeclipse编译后的jsp文件存放位置
    各种中文乱码
    各种提交的区别
  • 原文地址:https://www.cnblogs.com/angelfeather/p/1225922.html
Copyright © 2011-2022 走看看