protected void btnSearch_Click(object sender, EventArgs e)
{
string In = string.Empty;
string SearchText = txtSearch.Text;
if (ddlSearchWhere.SelectedIndex == 0) -----this is from a dropdown list for the user to choose where they want their text searched----
In = "[contains(title,"+'txtSearch.Text')]";
if (SearchText != null)
SearchText = In;
//In = "[contains(title, '" + SearchText;
xmlDataSource1.DataFile = @"rss.xml";
xmlDataSource1.XPath = @"rss/channel/item" + SearchText;// + sTemp;
xmlDataSource1.DataBind();
dtlDisplay.DataSource = xmlDataSource1;
dtlDisplay.DataBind();
|