Infragistics Home

Infragistics Forums

Infragistics community online discussions.
Welcome to Infragistics Forums Sign in | FAQ
in Search

Web toolbar and master page problem.

Last post 08-07-2008 16:00 by darylleger. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 08-07-2008 15:46

    Web toolbar and master page problem.

    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.

     

    Inherits System.Web.UI.MasterPageProtected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

     

    End Sub

    Private Sub setMenuButtons(ByVal bvalue As Boolean)

    tlbrMain.Items.FromKeyButton("RecipSrch").Visible = bvalue

    tlbrMain.Items.FromKeyButton("LocatSrch").Visible = bvalue

    tlbrMain.Items.FromKeyButton("pickup").Visible = bvalue

    tlbrMain.Items.FromKeyButton("logout").Visible = bvalue

    tlbrMain.Items.FromKeyButton("LogInPage").Visible = bvalue

    tlbrMain.Items.FromKeyButton("help").Visible = bvalue

    End Sub

    Private Sub HeadContent_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles HeadContent.Load

    If SCLSession.QuickSearch = True Then

    setMenuButtons(False)

    Else

    setMenuButtons(True)

    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

    Else

    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 If

    End Sub

    End Class

    • Post Points: 5
  • 08-07-2008 16:00 In reply to

    Re: Web toolbar and master page problem.

    Answer

    have to move the toolbar OUT of the content areas and then it works fine.

     

     

    • Post Points: 5
Page 1 of 1 (2 items)
Powered by Community Server (Commercial Edition), by Telligent Systems