Create a method named IsCurrent in Master Page
protected string IsCurrent(string page)
{
return Request.Url.AbsolutePath.ToLower().EndsWith(page.ToLower()) ? "active" : "";
}
And then for your Menu Item you need to call the method as follows
<a href="index.aspx" class = '<%= IsCurrent("Dashboard.aspx") %>' ><span aria-hidden="true" class="icon-home"></span>Dashboard</a>
Where you need to pass the name of the page to which the URL will redirect when clicked
And if the current page matches then it wil return active