hello, i have some linkbuttons like manu items with onClick event, witch set css attributes and loading different usercontrols in placehoder control.
here is code for one of my linkbuttons:
here is the way I'm loading usercontrols dynamicaly in placehodler:
now i want to use RadAjaxManager to update div element where is placed placeholder:
here is my ajax code:
problem is that , homebtn click doesn't work properly , css class don't add and on second click it doesn't load usercontrol at all.
sorry for my bad English, not native language..
here is code for one of my linkbuttons:
protected void homeBtn_Click(object sender, EventArgs e)
{
ControlPath = "Mainpage.ascx";
LoadUserControl();
homeBtnH4.Attributes.Add("class", "activem");
eventBtnH4.Attributes.Remove("class");
}
here is the way I'm loading usercontrols dynamicaly in placehodler:
private void LoadUserControl()
{
if (!string.IsNullOrEmpty(ControlPath))
{
placeHolder1.Controls.Clear();
UserControl uc = (UserControl)LoadControl(ControlPath);
placeHolder1.Controls.Add(uc);
}
}
public string ControlPath
{
get
{
if (ViewState["controlPath"] != null)
return Convert.ToString(ViewState["controlPath"]);
else
return null;
}
set
{
ViewState["controlPath"] = value;
}
}
now i want to use RadAjaxManager to update div element where is placed placeholder:
<
div
class
=
"contentholder"
id
=
"updatepanel"
runat
=
"server"
>
<
asp:PlaceHolder
ID
=
"placeHolder1"
runat
=
"server"
></
asp:PlaceHolder
>
</
div
>
here is my ajax code:
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"homeBtn"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"updatepanel"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
>
</
telerik:AjaxUpdatedControl
>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
telerik:RadAjaxLoadingPanel
ID
=
"RadAjaxLoadingPanel1"
runat
=
"server"
Skin
=
"Default"
>
</
telerik:RadAjaxLoadingPanel
>
problem is that , homebtn click doesn't work properly , css class don't add and on second click it doesn't load usercontrol at all.
sorry for my bad English, not native language..