|
Sub rp2_ItemCreated(Sender As Object, e As RepeaterItemEventArgs)
Dim objItem As RepeaterItem
Dim objLabel As TextBox
For Each objItem In rp2.Items
Select Case objItem.ItemType
Case ListItemType.AlternatingItem, ListItemType.Item, ListItemType.SelectedItem
objLabel = CType(objItem.FindControl("lbl_linkstarter"), Textbox)
objLabel.Text = "adfs"
End Select
Next
response.write(objLabel)
t = left(DataBinder.Eval(e.Item.DataItem, "Title"),1)
if not prev = t then
if not objLabel is Nothing then
objLabel.Text = "213123"
end if
prev = t
end if
I changed the code a bit
Still when I try to assign the text to it, i get a error
the error is:
objLabel.Text = "adfs"
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Also if I assign the text like
objLabel.Text = "adfs"
its asigning the text to a replica objLabel instead of the actual label in the repeater isnt it?
|