Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 09, 2012 07:09 AM by Dino He - MSFT
Feb 07, 2012 07:45 AM|LINK
I have a requirement where file has to be uploaded in .Html format using fileUpload. and i want to capture all the values in that particluar HTML file and put that in related columns in to database. How can i capture the values from HTML format. ??? please
with codes/links/suggestions. Thanks in advance.
Feb 07, 2012 09:37 AM|LINK
You can use the webclient to retreive string inside a html file from the server..
WebClient client = new WebClient();
// Download string.
string value = client.DownloadString("http://www.YYYY.com/sample.html");Hope it was useful..
Feb 08, 2012 04:24 AM|LINK
Thanks for the reply , i want to extract the data from the .HTML file which is present in my hardisk not from an URL.
While i was googlin it, i got somthing like this http://www.codeproject.com/Articles/20528/HTML-Parser-HTML-Data-Extractor-HTML-Extractor , but it's not helping me. can some one get somethign similar.
Feb 09, 2012 07:09 AM|LINK
If the HTML file is present in you computer , you can use IO method, like streamReader to get all the imformation you want.
Some thing like this:
string ReadHTMLFile(string path)
using (StreamReader strReader = new StreamReader(path))
StringBuilder strBuilder = new StringBuilder();