Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2010-09-15
2
Medium Priority
?
316 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
[X]
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
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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

618 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