html里的<%=变量名 %>是什么意思
谢谢哈

解决方案 »

  1.   

    直接调用后台的public方法或参数
      

  2.   

    谢谢 和我猜的一样
    不过这个变量的申明位置有要求吗?
    要在Page_Load的上面申明成全局变量吗?
      

  3.   

    后台load事件外 public string 前台要的变量名 = string.Empty;赋值操作根据需求了前台显示<%=前台要的变量名 %>
      

  4.   

    后台声明时要全局变量或静态变量,然后Page_Load时候赋值
      

  5.   

     <iframe  id="pageif" width="100%" src="<%=geturl() %>"  frameborder="0"  layoutH="0"   height="200px"  name="mainFrame" ></iframe>
     public string geturl()
            {            string str = string.Empty;
                
                switch (status)
                {
                    case "1":
                        str = "rightlist.aspx";
                        break;
                    case  "2":
                        str = "rightsearch.aspx";
                        break;
                    default:
                        str = "rightlist.aspx";
                        break;
                }
                return str;
            }
      

  6.   

    asp.net 内联标签asp.net inline tags各种各样的
      

  7.   

    调用后台的public 方法
      

  8.   

    <%@ - Page/Control/Import/Register directive 
    <%$ - Resource access and Expression building 
    <%= - Explicit output to page, equivalent to <% Response.Write( ) %> 
    <%# - Data Binding. It can only used where databinding is supported, or at the page level if you call Page.DataBind() in your code-behind. 
    <%-- - Server-side comment block 
      

  9.   

    http://stackoverflow.com/questions/517721/in-asp-net-what-is-the-difference-between-and
      

  10.   

        public string 变量名;
        protected void Page_Load(object sender, EventArgs e)
        {    }