asp.net 设置网站统一标题

    技术2022-05-19  22

    1.在Global.asax 中新建网站全局变量 (public static string gettitle)

     

    2.然后在 protected void Application_BeginRequest(Object sender, EventArgs e) { 设置全局变量gettitle的值(从数据库中提取)}

     

    3.最后在每个网页设置 <title><%= global_asax.gettitle %></title>


    最新回复(0)