PageRenderTime 8ms CodeModel.GetById 2ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

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

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