PageRenderTime 19ms CodeModel.GetById 15ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/BlogEngine/BlogEngine.NET/admin/Widgets/Menu.ascx.cs

#
C# | 19 lines | 14 code | 0 blank | 5 comment | 1 complexity | c1677c2460862c91e00df6d851bef03c MD5 | raw file
 1namespace admin.Widgets
 2{
 3    public partial class Menu : System.Web.UI.UserControl
 4    {
 5        /// <summary>
 6        /// Indicate that menu item selected
 7        /// </summary>
 8        /// <param name="pg">Page address</param>
 9        /// <returns>CSS class to append for current menu item</returns>
10        protected string Current(string pg)
11        {
12            if (Request.Path.ToLower().Contains(pg.ToLower()))
13            {
14                return "class=\"content-box-selected\"";
15            }
16            return "";
17        }
18    }
19}