[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 319
  • Last Modified:

Asp.net vb.net hide show control when page call is products.aspx

I have a master page and other content pages and i need to hide a control when user click in products.aspx page and show control when click in another page
0
rflorencio
Asked:
rflorencio
1 Solution
 
Luis PérezSoftware Architect in .NetCommented:
In javascript, you can do the following:

document.getElementById('control_id').style.display = 'none'

Hope that helps. Maybe if you give more details of what control you want to hide/show it will be easier to answer.
0
 
Carl TawnSystems and Integration DeveloperCommented:
If the control is located in the masterpage itself then you can checn the requested page and hide/show the control accordingly:


// in masterpage
protected void Page_Load(object sender, EventArgs e)
{
   if (Request.Url.AbsoluteUri.Contains("Products.aspx"))
      // hide the control
   else
      // show the control
}

Open in new window

0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now