Hi,
I'm having problems applying my 'AsciiToString' function to the DataView. I tried this AsciiToString(filter); but that did not work because the text 'publisher LIKE' was in the way. Any idea how I can remove that from my filtered string? Thanks.
private void BindRepeater(string term)
{
DataSet ds = (DataSet)Cache["InfoToFilter"];
if (ds == null)
{
ds = GetInfoFromDB();
Cache["InfoToFilter"] = ds;
}
DataView view = new DataView();
view.Table = ds.Tables[0];
string filter = String.Format("publisher LIKE '{0}'", term);
view.RowFilter = filter;
GridView1.DataSource = view;
GridView1.DataBind();
}
private static string AsciiToString(string content)
{
string StrValue = "";
while (content.Length > 0)
{
// convert each ASCII value to the actual character
StrValue += System.Convert.ToChar(System.Convert.ToInt32(content.Substring(0, 3))).ToString();
// Remove the converted value
content = content.Substring(3, content.Length - 3);
}
content = StrValue;
return content;
}