Anybody Please format my question so that I can post ? Q) search text in each row of the model and highlight it is found. code is below.
<tbody>
foreach(var item in @Model.Rows)
{
<tr>
@if(Model.SearxhText!=null && Model.SearchText.Length>0)
{
for(int i=0;i<=item.Length-1;i++)
{
if(item[i].IndexOf(Model.SearchText,0,StringComparison.CurrentCultureIgnoreCase)!=-1)
{
<td>
<span style="color:blue">@Model.SearchText</span>remainingtex t</td>
}
else
{
<td> @item[i]</td>
}
}
</tr>
}
</tbody>