Confirm Message in DataGrid
-
Hi Friends, I new to vb.net. In c#.net in GridView i use RowDataBound method and make a check if commandname is Delete i catch the linkbutton(Delete) by FindControl and on Click i give javascript method for Confirm. If Ok it goes to RowDeleting else Cancel. I am trying something same in vb.net for DataGrid. The button in DataGrid is <asp:ButtonColumn Text="??a??af?" ButtonType="PushButton" CommandName="Delete"></asp:ButtonColumn> Any idea how can Throw a Confirm Message on Click of This button? Any help would be greatly appreicated Thanks
Cheers Menon
-
Hi Friends, I new to vb.net. In c#.net in GridView i use RowDataBound method and make a check if commandname is Delete i catch the linkbutton(Delete) by FindControl and on Click i give javascript method for Confirm. If Ok it goes to RowDeleting else Cancel. I am trying something same in vb.net for DataGrid. The button in DataGrid is <asp:ButtonColumn Text="??a??af?" ButtonType="PushButton" CommandName="Delete"></asp:ButtonColumn> Any idea how can Throw a Confirm Message on Click of This button? Any help would be greatly appreicated Thanks
Cheers Menon
VB.NET is just like C#, except for the lack of ; and more verbose, and less challenging :) In either case, rather than requiring a postback to inject javascript code into the page to display a confirm dialog, you could just use a template button to contain a simple button control and specify the javascript. only two letters away from being an asset