Better yet... here's how to find out. Break in the ItemDataBound event
for the repeater and play with finding the control in the tree in the
immediate window. To get to the immediate window... type "immed" in
the command window.
Now when doing this at times you will want to see a parent... so you're
tree walk will look something like this.
((PlaceHolder)((MultiView)((RepeaterItem)control.F indControl("ctlMyControl")).Parent).Parent).Visibl e
That's just an example, but it's an example of how long it can get. If
you do any WPF work in the future, it's the same idea there too.
On Oct 5, 4:26 pm, "sck10" <s...@online.nospamwrote:
Hello,
How do you reference a label inside a repeater? I tried the following and
got the error:
Object reference not set to an instance of an object.
((Label)this.rptRSS.FindControl("lblRSSFeed")).Tex t = "My Value";
<asp:Repeater id="rptRSS" runat="server">
<HeaderTemplate>
<table class="tblOutline" border="1px" style="width:99%">
<tr>
<th style="width:50%"><asp:Label id="lblRSSFeed" runat="server" /></td>
</tr>
Thanks, sck10