S
Steven K
Hello (asp.net 2),
I have 3 controls on my content page that I trying to assign values to.
lblCompetitor01Name
lblCompetitor02Name
lblCompetitor03Name
In my codebehind I am using the following:
Dim lblFindControl As New Label(), ctrLoop As Integer
For ctrLoop = 1 to 3
lblFindControl.ID = "lblCompetitor0" & ctrCompetitor & "Name"
lblFindControl.Text = spSearchResults("strCompanyName")
Response.Write(lblFindControl.Text & "<br>")
Next ctrLoop
I am setting the ID value to the control on my page, but the text value is
not being populated.
On my old web pages I could use the following:
CType(FindControl("lblCompetitor0" & ctrCompetitor & "PriceType"),
Label).Text = spSearchResults("strCompanyPriceType")
Any help with this would be appreciated
I have 3 controls on my content page that I trying to assign values to.
lblCompetitor01Name
lblCompetitor02Name
lblCompetitor03Name
In my codebehind I am using the following:
Dim lblFindControl As New Label(), ctrLoop As Integer
For ctrLoop = 1 to 3
lblFindControl.ID = "lblCompetitor0" & ctrCompetitor & "Name"
lblFindControl.Text = spSearchResults("strCompanyName")
Response.Write(lblFindControl.Text & "<br>")
Next ctrLoop
I am setting the ID value to the control on my page, but the text value is
not being populated.
On my old web pages I could use the following:
CType(FindControl("lblCompetitor0" & ctrCompetitor & "PriceType"),
Label).Text = spSearchResults("strCompanyPriceType")
Any help with this would be appreciated