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.
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.
Pradeep pooj...
Member
2 Points
6 Posts
How to capture values from HTML file into a database.
Feb 07, 2012 07:45 AM|LINK
Hello all,
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.
cool_cupid_j...
Participant
1741 Points
354 Posts
Re: How to capture values from HTML file into a database.
Feb 07, 2012 09:37 AM|LINK
hai,
You can use the webclient to retreive string inside a html file from the server..
Robert
Pradeep pooj...
Member
2 Points
6 Posts
Re: How to capture values from HTML file into a database.
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.
Dino He - MS...
Star
8068 Points
1023 Posts
Microsoft
Re: How to capture values from HTML file into a database.
Feb 09, 2012 07:09 AM|LINK
Hi
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(); while (!strReader.EndOfStream) { strBuilder.Append(strReader.ReadLine()); } return strBuilder.ToString(); } }If you have any feedback about my replies, please contact msdnmg@microsoft.com
Microsoft One Code Framework