Currently facing a perplexing issue while developing a website using aspx.net and c#. The following code snippet is on my masterpage:
protected void Page_Load(object sender, EventArgs e)
{
if (HttpContext.Current.Request.Url.AbsolutePath == "/Pages/Overzicht.aspx")
{
pagOverzicht.Attributes.Add("class", "active");
}
if (HttpContext.Current.Request.Url.AbsolutePath == "/Pages/Defeault.aspx")
{
pagPackage.Attributes.Add("class", "active");
}
if (HttpContext.Current.Request.Url.AbsolutePath == "/Pages/page1.aspx")
{
pagToevoegen.Attributes.Add("class", "active");
}
if (HttpContext.Current.Request.Url.AbsolutePath == "/Pages/page2.aspx")
{
pagWijzigen.Attributes.Add("class", "active");
}
The goal is to make the current page active. It works in the test environment but not when published on the server.
Tried hitting ctrl+f5, but no luck. Any ideas why it's not working?