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

Adding Attributes to DataList Problem

Status
Not open for further replies.

raphael232

Programmer
Joined
Jun 9, 2006
Messages
51
Location
GB
Hi, can anyone see what is wrong with the following

Code:
Protected Sub ImagesList_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataListItemEventArgs) Handles ImagesList.ItemDataBound
        If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then
            e.Item.Attributes.Add("onmouseover", "this.className = 'TableContentHover';")
            e.Item.Attributes.Add("onmouseout", "this.className = '';")
        End If
    End Sub

I am trynig to add onmouseover and onmouseout attributes to each row of my datalist. But when i view the source nothing has changed.

Appreciate if you could help. Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top