This is a migrated thread and some comments may be shown as answers.

RadPanelbar SelectedItem on Server

3 Answers 145 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Patrick Gruhn
Top achievements
Rank 1
Patrick Gruhn asked on 18 Dec 2010, 10:53 AM
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

3 Answers, 1 is accepted

Sort by
0
Patrick Gruhn
Top achievements
Rank 1
answered on 20 Dec 2010, 11:19 AM
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
0
Patrick Gruhn
Top achievements
Rank 1
answered on 20 Dec 2010, 11:49 AM
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
0
Patrick Gruhn
Top achievements
Rank 1
answered on 20 Dec 2010, 12:39 PM
Hallo,

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

Best regards
Patrick
Tags
PanelBar
Asked by
Patrick Gruhn
Top achievements
Rank 1
Answers by
Patrick Gruhn
Top achievements
Rank 1
Share this question
or