Wierd datalist behavior
I have a datalist with some labels embedded inside.
When the page loads, I can see all my labels contain text. on my
datalist_onitemcommand i can even reset their text to something else. What i
can't do is GET the text from the labels i can access. Code is as follows
(no error messages)
Protected Sub test(ByVal source As Object, ByVal e As
If e.Item.ItemType = ListItemType.Item Or _
e.Item.ItemType = ListItemType.AlternatingItem Then
Dim s As String
Dim title As String
Dim loc As String
Dim titlelbl As Label
titlelbl = CType(e.Item.FindControl("MyTitle"), Label) ' Does not give me
the labels text even though the page shows text in the label
title = titlelbl.Text
'If i try something like (titlelbl.text = "Foo") here, it works as expected
|All times are GMT. The time now is 04:07 AM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.