0

hello all,

i want to save the web page content into a database. how can i fetch data from that website and save into a sql database. im using c# as front end.

need help.

expecting reply soon since it needed for my project.

thanks.

2
Contributors
5
Replies
6
Views
7 Years
Discussion Span
Last Post by Mohtshm
0

u can do this as
following code should be used in codebehind page load method or any u should know better from where u want the desired out put should be saved.
<code> System.Text.StringBuilder sb = new StringBuilder();
TextWriter tWriter=new StringWriter(sb);
HtmlTextWriter htmlWriter=new HtmlTextWriter(tWriter);
this.Render(htmlWriter);
string outputResponseForDb=sb.ToString();
</code>

0

sorry to ask u silly like this,

where should i place ur code..

help me pls

0

i want to fetch the table of contents. lets say if there is a web page which has the table i want to save that whole table contents on to sql server database.. how can i do it programmatically.

help me.

thanks

0

outputResponseForDB sttring has all html if there is only one table then use indexOf("table") to get the index of starting index and last index then substring on outputResponseForDB would do the job

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.