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: Apr 23, 2018 3:21 PM
Views: 9
Tags: command select
select command para o sqldatasource
  1. SqlDataSource2.SelectCommand = "SELECT sum(valor) as total from movimentos where (tipo='Pagamento'and edificio=@a) ";
  2.             SqlDataSource2.SelectParameters.Add("@a", DropDownList1.SelectedValue);
  3.             SqlDataSource2.DataBind();
  4.             DataView dvsqllist = (DataView)SqlDataSource2.Select(DataSourceSelectArguments.Empty);
  5.             DataTable tablelist = dvsqllist.Table;
  6.             txtPagamentos.Text = tablelist.Rows[0]["total"].ToString();