Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 2010-09-15
2
310 Views
Last Modified: 2012-06-27
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
Comment
Question by:rflorencio
2 Comments
 
LVL 25

Expert Comment

by:Luis Pérez
ID: 33680720
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
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 500 total points
ID: 33680745
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question