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: Sep 8, 2018 6:20 PM
Views: 12
Tags: like mysql
instrução like em mysql
  1.  
  2.  SqlDataSource1.SelectParameters.Clear();            
  3.                 SqlDataSource1.SelectCommand ="select * from alunos where nome  like CONCAT('%',?,'%') and ativo=1";                              
  4.             SqlDataSource1.SelectParameters.Add("@a", txtPesquisa.Text);
  5.             SqlDataSource1.DataBind();
  6.             GridView1.DataBind();