Hide button in MasterPage

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?
LVL 1
cmleung2Asked:
Who is Participating?
 
davehunt00Connect With a Mentor Commented:
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

hth
davehunt00
0
 
cmleung2Author Commented:
works perfectly. thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.