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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

foreach(DataListItem item in ListItemstest)

Status
Not open for further replies.

hlybbi

Programmer
Mar 19, 2003
91
0
0
IS
foreach(DataListItem item in ListItemstest.Items)
{
how can i change the button.text
}

<asp:ListItems id="ListItemstest" Runat="server">
<ItemTemplate>
<asp:Button id="test" text="">



Best regards Hlynur
 
Is this a listbox control you are using? If so:
Code:
        Dim CurrentListItem As ListItem
        For Each CurrentListItem In ListBox1.Items
            CurrentListItem.Text = "My New Text"
        Next

----------------------------------------------------------------------

Need help finding an answer?

Try the search facilty ( or read FAQ222-2244 on how to get better results.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top