开发者

ASPxNavBar state not being persisted

开发者 https://www.devze.com 2023-04-08 15:34 出处:网络
I am using the ASPxNavBar on the master page of my sharepoint site (Sharepoint Foundation 2010).I have succefully integrated the control so that it functions properly however i am have a problem that

I am using the ASPxNavBar on the master page of my sharepoint site (Sharepoint Foundation 2010). I have succefully integrated the control so that it functions properly however i am have a problem that the state of the navbar (which groups are open) is not being persisted) Here is some of the code

                              <Sharepoint:SPNavigationManager

                                id="QuickLaunchNavigationManager"

                                runat="server"

                                QuickLaunchControlId="ASPxNavBar1"

                                ContainedControl="QuickLaunch"

                                EnableViewState="false">



                                <dx:ASPxNavBar ID="ASPxNavBar1"

                                    AutoCollapse="true"

                                    Paddings-PaddingLeft="0"

                                    Paddings-PaddingRight="0"

                                    Paddings-PaddingTop="0"

                                    runat="server"

                                    GroupSpacing="0"

                                    AllowSelectItem="true"

                                    BackColor="Transparent"

                                    ForeColor="White"

                                    Width="220px"

                                    ItemLinkMode="TextOnly"

                                    EnableAnimation="true"

                                    ShowExpandButtons="true"

                                    AllowExpanding="true"

                                    ItemStyle-SelectedStyle-Font-Italic="true"

                                    ItemStyle-SelectedStyle-Font-Bold="true"

                                    ExpandImage-Url="/_layouts/images/FamilyCarePRL/Buttons/Expand.png"

                                    CollapseImage-Url="/_layouts/images/FamilyCarePRL/Buttons/Contract.png"

                                    SaveStateToCookies="True"

                                     >

                                    <GroupHeaderStyle Height="40" BackColor="Transparent">

                                        <BackgroundImage ImageUrl="/_layouts/images/FamilyCarePRL/Buttons/NavBarButtonGradient.png"

                                            Repeat="RepeatX" />

                                        <Border BorderColor="Black"></Border>

                                    </GroupHeaderStyle>

                                    <Groups>

                                        <dx:NavBarGroup Name="AboutUs" Text="About Us">

                                            <Items>

                                                <dx:NavBarItem Name="Vision" Text="Our Vision">

                                                    <Template>
开发者_高级运维
                                                        <asp:ImageButton ID="ImageButton1" ImageUrl="/_layouts/images/FamilyCarePRL/Buttons/Vision.png"

                                                            PostBackUrl="<% $SPUrl:~SiteCollection/SitePages/Vision.aspx%>" runat="server" />

                                                    </Template>

                                                </dx:NavBarItem>

                                    .

                                    .

The problem is that when i click on the image button it takes you to the site page but the state of the NavBar is not persisted. I have set SaveStateToCookies to true but that doesn't seem to work. Any suggestions are much appreciated


The ASPxNavBar synchronizes the selected NavBarItems according to the NavigateUrl and page Url. To resolve this issue, specify the NavBarItem's NavigateUrl as follows:

<dx:NavBarItem ... NavigateUrl="<% $SPUrl:~SiteCollection/SitePages/Vision.aspx%>">
</dx:NavBarItem>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号