By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,376 Members | 1,537 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,376 IT Pros & Developers. It's quick & easy.

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

P: n/a
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 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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
<pi****@absoluteprecision.co.zawrote in message
news:11*********************@e9g2000prf.googlegrou ps.com...
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 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.