hai! I have use below code for ascx control page navigation depending upon ascx page name using panel bar...I need breadcrumb for ascx page navigation..can anyone findout some samples...
public string TrackedUserControl
{
get { return ViewState["TrackedUserControl"] as string; }
set { ViewState["TrackedUserControl"] = value; }
}
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostingFromMenu() && IsPostBack)
ReloadContent();
}
protected void PanelNavigation_PanelNavigationItemClick(object sender, RadPanelBarEventArgs e)
{
LoadContent(e.Item.Value);
}
private void LoadContent(string menuItemName)
{
string ucUrl = menuItemName + ".ascx";
UserControl uc = null;
try
{
uc =
this.LoadControl(ucUrl) as UserControl;
if (uc != null)
{
ContentPlaceholder.Controls.Add(uc);
TrackedUserControl = ucUrl;
}
}
catch (Exception ex)
{
string msg = ex.Message;
}
}
private void ReloadContent()
{
UserControl uc = null;
try
{
uc =
this.LoadControl(TrackedUserControl) as UserControl;
}
catch
{
}
if (uc != null)
ContentPlaceholder.Controls.Add(uc);
}
private bool IsPostingFromMenu()
{
string ctlPostingBack = ScriptManager.GetCurrent(this).AsyncPostBackSourceElementID;
Control c = this.FindControl(ctlPostingBack);
if (c == null)
return false;
return (c.ID == "PanelNavigation");
}
thx