I have this label inside a repeater
<asp:Label id="lblsub" runat=server text="sdds" />
I am trying to change the text of this label,this is the code behind
For Each Item As RepeaterItem In dg.Items
Dim l As New label
l = CType(Item.FindControl("lblsub"), System.Web.UI.WebControls.Label)
l.text="test"
Next
unfortunately this code doesn’t work for me ,the text value doesn’t change ,so I will be very happy to some help here
thanks
See my answer in this question. Believe it will solve your issue.
Getting the databound value from repeater control in asp.net
EDIT
First of all, make sure you always use quotes in your markup:
Try something like this in your code behind. Forgive me if my VB is a little rusty:
There were just a couple little problems with syntax. I don’t know if they are causing your issue, but best get the easy stuff out of the way first.