More in this section

Forums / Developing with Sitefinity / Issues with postbacks and SitePanelBar

Issues with postbacks and SitePanelBar

5 posts, 0 answered
  1. Chris Breymeyer
    Chris Breymeyer avatar
    21 posts
    Registered:
    16 Nov 2007
    06 Feb 2008
    Link to this post
    Our site uses a master page with a modal popup box, and the SitePanelBar.  The modal popup box causes a postback and results in the SitePanelBar not being re-rendered.  I have looked for a setting in sitefinity to persist the binding to no avail.

    I did notice that in the SitePanelBar control's code behind that the Page_Load function was only rendering when the condition (! Page.IsPostBack) was met.  So when I have a control that posts back to the server (ie a Modal Popup or a PollBox control) the SitePanelBar is not re-rendered with its datasource.

    My question is, can I remove the condition (! Page.IsPostBack) without negatively affecting something else?

    Thanks,
  2. Sean
    Sean avatar
    271 posts
    Registered:
    31 May 2006
    07 Feb 2008
    Link to this post
    Hi John,

    Pardon me if I am wrong but I think you can safely remove that code it will just mean that the code will run everytime the page posts back.  That will have some small performance impact on the server side,  Or you can enable the Viewstate instead which will increase the size of the page, but then you can leave the !Postback in there.

    So up to you which you prefer really.

    Kind Regards
    Sean
  3. Pepi
    Pepi avatar
    981 posts
    Registered:
    31 Jan 2017
    07 Feb 2008
    Link to this post
    Hello John Reynolds,

    Panelbar in SitePanelbar user control is binding declaratively to a site map using a SiteMapDataSource control. When the page is loaded for the first time, we explicitly bind the Panelbar to set some styles for the currently selected item. So removing (!Page.IsPostBack) will not break the proper functionality of SitePanelbar. But I tried to reproduce your problem by setting SitePanelbar and a modal popup on the master page with no success. Panelbar was rendered properly in case of modal popup postback. If the information does not help solve the issue, please send us your master page to investigate it locally.

    All the best,
    Pepi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  4. Chris Breymeyer
    Chris Breymeyer avatar
    21 posts
    Registered:
    16 Nov 2007
    07 Feb 2008
    Link to this post

    I am replying to both posts so forgive me if I go back and forth.

    Sean,  I have already tried saving the viewstate, but that did not do the trick.

    Pepi, My master page is mainly content placeholders.  In my specific case, the modal dialog, and Control button for initiating the modal dialog are coded into the master page.  The SitePanelBar is added through the Sitefinity Editor.  I'm not sure if that makes a difference or not.

    Thanks,

    John

  5. Pepi
    Pepi avatar
    981 posts
    Registered:
    31 Jan 2017
    08 Feb 2008
    Link to this post
    Hi John,

    If you are still having problems, please send us the master page with the modal popup in it to figure out what is wrong. Unfortunately, we cannot reproduce any unexpected behavior with the binding of SitePanelbar even after following your explanations.

    Thanks for your cooperation in advance.

    All the best,
    Pepi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Register for webinar
5 posts, 0 answered