Hide button in MasterPage

Posted on 2007-10-02
Medium Priority
Last Modified: 2008-01-09
I am using a MasterPage with a button, and I want to hide this button for a particular page.  To be more specific, I have a Signup.aspx page that uses a MasterPage, where the MasterPage have a button called btn_paybutton.  But I want to hide the button for the Signup.aspx page.  Is it possible to do that?  How?
Question by:cmleung2

Accepted Solution

davehunt00 earned 2000 total points
ID: 20000076
In the page using the Master, cast the button locally and then make it not visible.

So in the page class
dim myButton as Button

Then in page_load
myButton = CType(Master.FindControl("Button1"), Button)   'where Button1 is the Master page button name
myButton.Visible = false


Author Comment

ID: 20000633
works perfectly. thanks.

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
Strategic internal linking is often considered an SEO power technique, especially for content marketing. Do you need to hire an SEO agency to optimize you internal linking? No, this article will help you understand the basics of internal linking and…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses
Course of the Month14 days, 7 hours left to enroll

807 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