PageRenderTime 42ms CodeModel.GetById 37ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

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

#
C# | 19 lines | 14 code | 0 blank | 5 comment | 1 complexity | f2a3ad6ba24bf04ce443ea1f3a84d9b2 MD5 | raw file
 1namespace Admin.Pages
 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}