c# gridview row click

后端 未结 9 1940
野的像风
野的像风 2020-12-01 09:34

When I click on a row in my GridView, I want to go to a other page with the ID I get from the database.

In my RowCreated event I have the following line:

         


        
9条回答
  •  生来不讨喜
    2020-12-01 10:16

    Can your ID be related to the data item displayed in the gridview?

    If so you can use e.Row.DataItem, and cast it to whatever type it is.

提交回复
热议问题