Question

I need to set visibility for an option called SVN in a navigation bar for a web form as false.

this is its code in the master page....

if (page.CurrentUser.Permissions.SVN()) ctrlLinkBar.AddLink("SVN", "SVN.aspx");

how do i do that?

Was it helpful?

Solution

I would:

  1. Override OnPreRender in my page
  2. Use Page.Master.FindControl("ctrlLinkBar") to find the link bar
  3. Remove any links on it with the name "SVN"

I'm assuming you can't just change the formula on the master page.

OTHER TIPS

This is a great article on Master Pages:

http://odetocode.com/articles/450.aspx

The 'Content Page to Master Page Interaction' section shows how you can do this using strongly typed properties.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top