I have a webtoolbar on master page in a Content area.
at runtime (code behind) i turn certain buttons off.
However when the project runs I get an null reference error on a tlbr item.
in the setMenuButtons sub, i get the error on the first line.
End Sub
tlbrMain.Items.FromKeyButton("RecipSrch").Visible = bvalue
tlbrMain.Items.FromKeyButton("pickup").Visible = bvalue
tlbrMain.Items.FromKeyButton("LogInPage").Visible = bvalue
If SCLSession.QuickSearch = True Then
Else
End If
If SCLSession.IsLoggedIn Then
tlbrMain.Items.FromKeyButton("LogInPage").Visible = False
tlbrMain.Items.FromKeyButton("logout").Visible = True
tlbrMain.Items.FromKeyButton("RecipSrch").Visible = True
tlbrMain.Items.FromKeyButton("LocatSrch").Visible = True
tlbrMain.Items.FromKeyButton("pickup").Visible = True
tlbrMain.Items.FromKeyButton("LogInPage").Visible = True
tlbrMain.Items.FromKeyButton("logout").Visible = False
tlbrMain.Items.FromKeyButton("RecipSrch").Visible = False
tlbrMain.Items.FromKeyButton("LocatSrch").Visible = False
tlbrMain.Items.FromKeyButton("pickup").Visible = False
End Class
have to move the toolbar OUT of the content areas and then it works fine.