Hi
This's my Location table list
chennai, mumbai, pune
chennai, mumbai
mumbai, cochin
delhi, bangalore
chennai
bangalore, chennai
For examples : Naukri, Monster jobportal website in location search category
If am give the input values for chennai, mumbai means i want list out the chennai and mumbai list values in this datalist
I am using this coding path please check it
I already use the coding path but i didnt got output. I send my coding please check the coding if error means please alter the coding and send me sir
coding in asp.net
string gh;
gh = lbllocat.Text.Trim();
StringBuilder sb = new StringBuilder();
if (gh != "" && gh != null)
{
string srch = "";
string[] ghsplit = gh.Split(',');
for (int i = 0; i < ghsplit.Length; i++)
{
string ghmultiple = ghsplit[i];
if (srch == "")
{
srch = ghmultiple[i].ToString().Trim();
bind_KeysrchFunction(lblkey.Text.Trim(), srch.Trim(), lblsrhcat.Text.Trim(), lblsrhexp.Text.Trim(), lblminsal.Text.Trim(), lblmaxsal.Text.Trim(), lblcomp.Text.Trim(), lblrole.Text.Trim(), lblfresh.Text.Trim(), lblsort.Text.Trim(), lblrefsearch.Text.Trim());
}
else
{
srch = srch + ',' +ghmultiple[i].ToString().Trim();
srch = srch + "or like '% ','" + ghmultiple.Trim() + "%'";
bind_KeysrchFunction(lblkey.Text.Trim(), srch.Trim(), lblsrhcat.Text.Trim(), lblsrhexp.Text.Trim(), lblminsal.Text.Trim(), lblmaxsal.Text.Trim(), lblcomp.Text.Trim(), lblrole.Text.Trim(), lblfresh.Text.Trim(), lblsort.Text.Trim(), lblrefsearch.Text.Trim());
}
}
if (srch != "")
{
sb.Append("and(" + srch + ")");
}
}
by
Bala
[edit]Code block added - OriginalGriff[/edit]