RadPanelbar SelectedItem on Server

4 posts, 0 answers
  1. Patrick Gruhn
    Patrick Gruhn avatar
    4 posts
    Member since:
    Apr 2010

    Posted 18 Dec 2010 Link to this post

    Hello,

    i am using a RadPanelbar in WebApplication to select a control to load, here is my code:

    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Page.FindControl("RadPanelBar1") != null)
            {
              if ((RadPanelBar1.SelectedItem != null))
                {
                    choiceActivity(RadPanelBar1.SelectedItem.Value);
                }
                else if (Page.FindControl("RadChart1") == null)
                {
                    choiceActivity("cockpit");
                }
            }
        }
     
        public void MessageboxAnzeigen(string Inhalt)
        {
            string Script = "<script type=\"text/javascript\">alert('" + Inhalt + "')</script>";
            RegisterClientScriptBlock("WindowOpener", Script);
        }
     
        public void openActivity(String controlName)
        {
            RadAjaxPanel1.Controls.Clear();
            UserControl userControl = (UserControl)this.LoadControl(controlName);
            userControl.ID = "myUC";
            this.RadAjaxPanel1.Controls.Add(userControl);
        }
        protected void RadPanelBar1_ItemClick(object sender, RadPanelBarEventArgs e)
        {
            choiceActivity(e.Item.Value);   
        }
     
        protected void choiceActivity(String itemValue)
        {
            if (Page.FindControl("myUC") == null)
            {
                switch (itemValue)
                {
                    case "stammdaten":
                        openActivity("Stammdaten.ascx");
                        break;
     
                    case "kundenverwaltung":
                        openActivity("StammdatenCockpit.ascx");
                        break;
                         
                    case "abrechnung":
                        openActivity("abrechnung.ascx");
                        break;
     
                    case "tarife":
                        openActivity("tarife.ascx");
                        break;
     
                    case "cockpit":
                        openActivity("cockpit.ascx");
                        break;
                }
            }
        }
        protected void LoginStatus1_LoggingOut(object sender, LoginCancelEventArgs e)
        {
     
        }
    }

    In VS it works fine, but deployed on the Server (IIS 7 on Win 2008 R2) it only shows the "cockpit" control and i can't unterstand what could be the different between VS und and the Server. The RadPanelbar seems to loose his state by every click (if i open a item its closed after the automatic reload of the page).

    Thank you for any help.

    UPDATE: I added a RadMenu and have exactly the same problem.

    UPDATE 2: I enabled "PersistStateInCookie" and now the Panelbar keeps expandend after the reload but it still doesn't add the control to the RadAjaxPanel.

    Best regards
    Patrick
  2. Patrick Gruhn
    Patrick Gruhn avatar
    4 posts
    Member since:
    Apr 2010

    Posted 20 Dec 2010 Link to this post

    Hello again,

    now I have the following additional problem:

    After a new webdeploy i get the following error:
    === Zustandsinformationen vor Bindung ===
    LOG: Benutzer = IIS APPPOOL\ASP.NET v4.0
    LOG: DisplayName = BEP_Online_System
     (Partial)
    WRN: Für eine Assembly wurden partielle Bindungsinformationen bereitgestellt:
    WRN: Assemblyname: BEP_Online_System | Domänen-ID: 6
    WRN: Eine partielle Bindung tritt auf, wenn nur ein Teil des Assemblyanzeigenamens bereitgestellt wird.
    WRN: Dies führt möglicherweise dazu, dass die Sammelmappe eine falsche Assembly lädt.
    WRN: Geben Sie die Textidentität der Assembly mit allen Einzelheiten an.
    WRN: Dazu gehören der einfache Name, die Version und Kultur und das öffentliche Schlüsseltoken.
    WRN: Weitere Informationen und allgemeine Lösungen für dieses Problem finden Sie im Whitepaper unter "http://go.microsoft.com/fwlink/?LinkId=109270".
    LOG: Appbase = file:///C:/inetpub/wwwroot/BIS/
    LOG: Ursprünglicher PrivatePath = C:\inetpub\wwwroot\BIS\bin
    Aufruf von Assembly : (Unknown).
    ===
    LOG: Diese Bindung startet im default-Load-Kontext.
    LOG: Die Anwendungskonfigurationsdatei wird verwendet: C:\inetpub\wwwroot\BIS\web.config
    LOG: Die Hostkonfigurationsdatei wird verwendet: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet.config
    LOG: Die Computerkonfigurationsdatei von C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config wird verwendet.
    LOG: Die Richtlinie wird derzeit nicht auf den Verweis angewendet (private, benutzerdefinierte, teilweise oder pfadbasierte Assemblybindung)
    LOG: Download von neuem URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/bis/39f11513/b7a3eb29/BEP_Online_System.DLL.
    LOG: Download von neuem URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/bis/39f11513/b7a3eb29/BEP_Online_System/BEP_Online_System.DLL.
    LOG: Download von neuem URL file:///C:/inetpub/wwwroot/BIS/bin/BEP_Online_System.DLL.
    ERR: Das Setup der Assembly konnte nicht abgeschlossen werden (hr = 0x8007000b). Die Suche wurde beendet.

    I allready try to remove the webapplication but i still get the same error.

    Thanks again
    Patrick
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Patrick Gruhn
    Patrick Gruhn avatar
    4 posts
    Member since:
    Apr 2010

    Posted 20 Dec 2010 Link to this post

    Hello,

    i solved the second problem by setting "Activate 32-Bit-Applikations"in AppPool to "true". But there is still the problem with the Panelbar.

    Best regards
    Patrick
  5. Patrick Gruhn
    Patrick Gruhn avatar
    4 posts
    Member since:
    Apr 2010

    Posted 20 Dec 2010 Link to this post

    Hallo,

    i solved now all problems. I add a new WebForm and with that file it works.

    Best regards
    Patrick
Back to Top