在下面ASP.NET的事件处理程序中,( )代码能够正确的判定GridView控件中所有行的[BookId]列值为2。Protected void GridView1_RowDataBound(object sender,GridViewRowEv

admin2014-09-10  21

问题 在下面ASP.NET的事件处理程序中,(    )代码能够正确的判定GridView控件中所有行的[BookId]列值为2。Protected  void GridView1_RowDataBound(object sender,GridViewRowEventArgse){}

选项 A、string lb1=DataBinder.Bind(e.Row.DataItem, “BookId”);
  If(lb1==”2”){   //….}
B、string lb1=DataBinder.Eval(e.Row.DataItem, “BookId”);
  If(lb1==”2”){   //….}
C、string lb1=Convert.Tostring(DataBinder.Eval(e.Row.DataItem, “BookId”));
  If(lb1==”2”){   //….}
D、string lb1= Convert.Tostring(DataBinder.Bind(e.Row.DataItem, “BookId”));
  If(lb1==”2”){   //….}

答案B

解析
转载请注明原文地址:https://kaotiyun.com/show/xmpD777K
0

最新回复(0)