Solved

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

Posted on 2010-09-15
2
308 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

920 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now