Question : DataGrid Click Event


Can anyone tell me why then function ShowDetails();") is never called, instead I get ERROR ON PAGE when i click on the grid row

      Protected Sub dg1_ItemCreated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles dg1.ItemCreated

        If e.Item.ItemType = ListItemType.Item OrElse e.Item.ItemType = ListItemType.AlternatingItem Then
            e.Item.Attributes.Add("onclick", "ShowDetails();")
        End If

    End Sub


    Public Sub ShowDetails()


    End Sub

Answer : DataGrid Click Event

In a word, Nope.  If you use SSL and a CAPTCHA image, you've done all you need to protect your forms.  If you filter the data and escape it properly, you've done all you need to protect your data base.

best regards, ~Ray
Random Solutions  
 
programming4us programming4us