|
-
June 14th, 2002, 10:28 AM
#1
Accessing Label within ASP Repeater
Hey guys,
I was wondering how you would access the text of a label which is contained within an asp reapeater....
for example,...
Code:
<asp:repeater id="level1" runat="server" datasource="....">
<asp:repeater id="level2" runat="server" datasource="...">
<asp:label id="lblText" runat="server">Text</asp:label>
</asp:repeater>
</asp:repeater>
I read from somewhere that you would grab it in this fashion...
Code:
ctype(page.FindControl("level1:level2:ctl0:lblText"), Label).text
but I get a "Object Not Instantiated" error.....
Thanks in Advance
Steven
-
June 14th, 2002, 10:31 AM
#2
Sorry Guys,
those greater than and less than sign messed up my post....
this is what it's supposed to be
Code:
<asp:repeater id="level1" runat="server" datasource="....">
<asp:repeater id="level2" runat="server" datasource="...">
<asp:label id="lblText" runat="server"> Text <asp:label>
</asp:repeater>
</asp:repeater>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|