client handling of the bubbled events

  • Thread starter Thread starter Tchernov \(BioStar\)
  • Start date Start date
T

Tchernov \(BioStar\)

I write the web-page with the DataGrid-control, that has the Button-column
with the delete-command. I want to capture the bubbled event from these
buttons on the client side before this event raises on the server. I want to
control that posting by the launching window.confirm message box. Is this
somehow possible?
 
Is this what you're trying to do?

//Assumes DataGrid g is defined elsewhere & contains
Delete Buttons with ID "MyButtonID"
foreach(DataGridItem i in g.Items){
((Button)i.FindControl("MyButtonID")).Attributes
["onclick"] = "return confirm('Are you sure?');";
}
 
Back
Top