"ruca" <ru***@iol.pt> wrote in message
news:eT**************@tk2msftngp13.phx.gbl...
Hi,
Can anyone tell me how can I call a function of my Web Page from
javascritp????
I have a grid that when I click in a cell I want to call another function
present in that same page?
It is possible to do that?
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca
In the grids ItemDataBound event handler, you can get a reference to the
specific cell (e.Item.Cells collection). Then use the cell's Attributes
collection to add a javascript string...quick non-tested example:
Private Sub grdMyGrid_ItemDataBound( _
ByVal sender As Object, _
ByVal e As DataGridEventArgs _
) Handles grdMyGrid.ItemDataBound
' Check the type of item is...i think using ItemType property...
' can't remember.
e.Item.Cells(0).Attributes.Add( _
"onclick", _
"javascript
:MyClientSideFunction();" _
)
End Sub
HTH,
Mythran