How do I update a DataList (on a UserControl) on a Master Page from a Content Page

Discussion in 'ASP .Net' started by pierre@absoluteprecision.co.za, Aug 31, 2007.

  1. Guest

    Hi,

    I have a DataList inside a UserControl, which I use on a MasterPage.
    My ContentPage lists items which a user can add to his/her shopping
    basket. Can someone PLEASE let me know how I can "refresh" the
    datalist, contained within a usercontrol (which is on the MasterPage),
    from the ContentPage.

    Thanks in advance,
    Pierre
     
    , Aug 31, 2007
    #1
    1. Advertising

  2. Kuldeep Guest

    Hi Pierre,

    Say you have a Label in the Master Page as shown below:

    <asp:Label ID="lblHeaderText" runat="server" CssClass="pageHeader"
    Text="Label on Master Page"></asp:Label>

    Now, on the content page, to work with this "lblHeaderText" on the Content
    Page, you can do something like this..
    Label lbHeader = (Label)Master.FindControl("lblHeaderText");
    lbHeader.Text = "Conent Page Name";

    Hope this helps..
    Kuldeep


    <> wrote in message
    news:...
    > Hi,
    >
    > I have a DataList inside a UserControl, which I use on a MasterPage.
    > My ContentPage lists items which a user can add to his/her shopping
    > basket. Can someone PLEASE let me know how I can "refresh" the
    > datalist, contained within a usercontrol (which is on the MasterPage),
    > from the ContentPage.
    >
    > Thanks in advance,
    > Pierre
    >
     
    Kuldeep, Aug 31, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Paul
    Replies:
    5
    Views:
    3,346
    Swanand Mokashi
    Apr 5, 2006
  2. Doug McCann
    Replies:
    1
    Views:
    1,037
    William Brogden
    Aug 5, 2004
  3. Replies:
    0
    Views:
    726
  4. Managed Code
    Replies:
    0
    Views:
    860
    Managed Code
    Jul 27, 2006
  5. Chevron Boyde
    Replies:
    1
    Views:
    1,134
    George
    Dec 8, 2008
Loading...

Share This Page