Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: ASP
Posted by: Mario Lopes
Added: May 17, 2018 2:28 PM
Views: 22
mostra como percorrer uma datatable
  1.  SqlDataSource2.SelectCommand = "select * from disciplinas where codigo=?";
  2.         SqlDataSource2.SelectParameters.Add("a", codigo_txt.Text);
  3.         DataView dvsqllist = (DataView)SqlDataSource2.Select(DataSourceSelectArguments.Empty);
  4.         DataTable tablelist = dvsqllist.Table;
  5.         SqlDataSource2.DataBind();
  6.         foreach (DataRow row in tablelist.Rows)
  7.         {
  8.             codigo = row["codigo"].ToString();
  9.         }