Posted on: 6/4/2012 9:28:53 AM | Views : 230

Hi,
I have code that is written in VB to confirm that a user wants to delete a record after the delete button is pressed. I am now working on a project that has C# pages in it so the VB version cannot be used. I’ve tried various online converters but none have converted correctly without getting errors in VS. Does anyone know a C# equivalent of this code, or recommend a better web-based conversion program?
Public Shared Sub AddDeleteConfirmation(ByVal deleteColumnIndex As Integer, ByVal e As GridViewRowEventArgs) '' Check you are only working with Data Rows, not headers/footers If e.Row.RowType = DataControlRowType.DataRow Then '' Loop through each control in the GridView command column For Each ctl As Control In e.Row.Cells(deleteColumnIndex).Controls Try '' If it is a LinkButton with a text value of Delete then add the confirmation message. ...

Go to the complete details ...