as there is table structure, which first cell contains image and second cell contains description. Product 2 is also same as Product1 in structure i.e there is Table whose first cell is Image and second is Description
Now Search.aspx contains one txtbox with button. If i type Speakers in textbox and click on button to search then my code should search above two pages i.e Product1 and Product2.aspx whether they contain Speakers word. if i got speakers word then my next task is to extract all that row i.e extract image and description and show it in Search.aspx file, which contains empty table....
I hope u understand my prob....
currently i m able to search word using ReadLine but as Readline only fetched single line at a time so getting problem to fetch all that TableRow...
can anyone help me?
thx in advance....
Suthish NairPosted Mar 3, 2011, 12:25 PM
Amruta KirdatPosted Mar 3, 2011, 3:58 AM
// Get a StreamReader to the file to be searched and create
// a StringBuilder to hold it's modified text to be displayed
// later.
myStreamReader = File.OpenText(Server.MapPath(strFileName));
StringBuilder myStringBuilder = new StringBuilder();
// Loop through file looking for search matches and
// highlighting them in the results. If we find a match
// we also make note of the line number.
//Do While Not myStreamReader.EndOfStream ' .NET 2.0 Syntax
while (myStreamReader.Peek() >= 0)
{
intLineNumber = intLineNumber + 1;
strLineText = myStreamReader.ReadLine();
if (strSearchText != "" && strLineText.IndexOf(strSearchText) > 0) // && InStr(strLineText, strSearchText) > 0
{
//some code goes here
}
myStreamReader.Close();
}
Suthish NairPosted Mar 3, 2011, 3:17 AM