Author: RN5A | Posted on: 10/26/2008 11:58:46 PM | Views : 245

I have a DataList which displays the first & last name of users as links (LinkButtons). When the links are clicked, 2 textboxes appear - one with the first name & the other with the last name - for the users to edit. At the same time, 3 LinkButtons - Cancel, Update & Delete also appear. I want to add a JavaScript confirm dialog to the Delete LinkButton. This is how I tried it in the OnItemDataBound event function of the DataList:

----------------------------------
<script runat="server">
    Sub BindItem(...........)
        If (dlUsers.EditItemIndex <> -1) Then
            If (ea.Item.ItemType = ListItemType.AlternatingItem Or ea.Item.ItemType = ListItemType.Item) Then
                Dim lnkDel As LinkButton
    & ...

Go to the complete details ...