Bread Crumbs With C#
- by kareemsaad
I made Class
And user Control
In master.cs
public partial class BreadCrumbs : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
// Put user code to initialize the page here
bc1.PageTitle = HeaderText;
}
protected BreadCrumbs.ctrlBreadCrumbs bc1;
private string _strHeaderText;
public string HeaderText
{
get
{
return _strHeaderText;
}
set
{
_strHeaderText = value;
}
}
}
User Control:
public partial class BreadCrumbs : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
// Put user code to initialize the page here
bc1.PageTitle = HeaderText;
}
protected BreadCrumbs.ctrlBreadCrumbs bc1;
private string _strHeaderText;
public string HeaderText
{
get
{
return _strHeaderText;
}
set
{
_strHeaderText = value;
}
}
}
protected System.Web.UI.WebControls.Literal lblPageTitle;
protected namespace.headerBreadCrumb header;
ClsCategory clscategory = new ClsCategory();
protected void Page_Load(object sender, EventArgs e)
{
// Put user code to initialize the page here
string PageTitle = "ASP.NET Breadcrumbs with C#";
lblPageTitle.Text = PageTitle;
header.HeaderText = PageTitle;
but it not work well
i think problem here
<%@ Register TagPrefix="bc" Namespace="BreadCrumbs" Assembly="BreadCrumbs" %>
<bc:ctrlBreadCrumbs id="bc1" runat="server" />