Author: bbcompent1 | Posted on: 2/10/2011 8:02:00 AM | Views : 271

Hello one and all. I have a situation where I have a table being brought in using HttpWebRequest (screen scraping). The table I grab is formatting properly but I have noticed a situation. This table has a URL which refers to a physical web page. What I would like to do is to take that URL using a .Replace clause and thereby change the URL to reflect <a href="details.aspx?id=111"> as opposed to <a href="111.htm">. So I went ahead and tried doing it this way but it doesn't do any replacement.
string result = sr.ReadToEnd(); // this reformats the table to no cell spacing, no cell padding and vertical alignment to top result = result.Replace("\r", "") .Replace("\n", "") .Replace("cellspacing=\"5\"", "cellspacing=\"2\"") .Replace("cellpaddin ...

Go to the complete details ...