Home > Net >  In the GridView value is selected via FindControl method to obtain the control problem
In the GridView value is selected via FindControl method to obtain the control problem

Time:02-20

As follows in a GridView data-bound controls, has realized the data binding, but need to add in one of the Columns a URL link, link the selected via FindControl method to obtain the control value and then string concatenation, call the method that page spread and realize the background to the operation of the complete data update,

 

BackColor="White" BorderColor="# CCCCCC" BorderStyle="Solid" BorderWidth="1 px Font" Size="Small"

Css>






<"SteffID" % # Eval (). The ToString () % & gt;








<"SteffName" % # Eval (). The ToString () % & gt;








<"SteffPid" % # Eval (). The ToString () % & gt;























Modify & lt;/a>







((DropDownList) GridView1. SelectedRow. Cells [3]. The FindControl (" DDLSteff ")). The SelectedValue now it is no good, prompt the object reference not set to an instance of an object,
  • Related