Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need an Item from Datalist 1

Status
Not open for further replies.

1Data

MIS
Sep 30, 2005
66
US
I need an Item off of a datalist so that I can use it in a Function (Code Behind Procedure).

I found this Line but don't know what else to add?

Datalist.Items.Item (?)

The Datalist is binded to a Reader off of a SQL DB. It works but I need a particular item to perform an IF Statement in my code.

thanks
 
You have to do a findcontrol and then grab the value:

Ex:
Code:
Dim l As New Label
l = <your datalist>.Items.Item(<index (row)>).FindControl("your conrol")

response.write l.text
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top