Bread Crumbs With C#

Posted by kareemsaad on Stack Overflow See other posts from Stack Overflow or by kareemsaad
Published on 2010-03-30T11:04:30Z Indexed on 2010/03/30 11:13 UTC
Read the original article Hit count: 1142

Filed under:

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" /> 

© Stack Overflow or respective owner

Related posts about c#