Hello,
i am using a RadPanelbar in WebApplication to select a control to load, here is my code:
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
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 ((RadPanelBar
1
.SelectedItem != null))
{
choiceActivity(RadPanelBar
1
.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)
{
RadAjaxPanel
1
.Controls.Clear();
UserControl userControl = (UserControl)this.LoadControl(controlName);
userControl.ID =
"myUC"
;
this.RadAjaxPanel
1
.Controls.Add(userControl);
}
protected void RadPanelBar
1
_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 LoginStatus
1
_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