Hi, i want to show whatever city i type on click on search button on vf page then through apex it shows that records belongs to that city on system.debug
public class searchBox {
public list <Account> acc {get;set;}
public String searchKey {get;set;}
public searchBox( ) {}
public void search(){
string searchquery='select Name,id from account where name like \ +searchKey+'%\'';
acc= Database.query(searchquery);
system.debug(acc);
}
}
Please mark it as the Best Answer so that other people can take references from it.
Hi Soujanya,
Please find the solution.
Please mark it as the Best Answer so that other people can take references from it.
Thank You