PageRenderTime 212ms CodeModel.GetById 18ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 1ms

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

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