hiding linkbuttons on masterpage

  • Thread starter Thread starter JohnE
  • Start date Start date
J

JohnE

I have a masterpage that has a row of linkbuttons on it. These linkbuttons
open up the different applications that are being developed. The number of
linkbuttons will continue to grow from the current 3 to at least 7 (possibly
more). The webapps are using a nested master page inheriting from the master
page which includes the css so the look and feel to the users is consistent.
The website opens to a specific webapp (a type of message center) and the
others can then be opened by using one of the linkbuttons. Each webapp opens
in its own window (Target="_blank"). When the webapp does open, the row of
linkbuttons show on the masterpage. The preference is to hide them when a
webapp opens so the user is not able to use them. This would only be for the
open webapp. Is there a way to hide the linkbuttons on the masterpage when
the webapps are opened up from the linkbuttons?

I have tried the following line but it does not seem to work, or I'm putting
it in the wrong place.

Page.Master.FindControl("hlnkProteus").Visible = false;

Thanks for the help on this. May need some specifics on this as my asp.net
is not that proficient.

.... John
 
Let me revise. They are hyperlinks, not linkbuttons.
Sorry about that.
 
Try this

in c#
LinkButton lnkBtnActivate = (LinkButton)Master.FindControl("lnkBtnActivate");
lnkBtnActivate.Visible = false;


in vb it would be
Dim lnkBtnActivate As LinkButton =
DirectCast(Master.FindControl("lnkBtnActivate"), LinkButton)
lnkBtnActivate.Visible = False
 
They are actually hyperlinks rather then linkbuttons. Also, I would put this
as code-behind but in the page load of the nested masterpage?

.... John
 
I couldn't understand the problem exactly , but here are three things which
you can do:

1: to hide masterpage's masterpage control
Master.Master.FindControl("HyperLink1").Visible = false;

2: onclick of linkbutton let it open a new application and call a server
side or javascript function to hide the linkbutton you want to hide for the
current page

3: you can call a javascript function of parent window from child window by
window.opener.functionname()
and from there you can show hide the things
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top