Click here to Skip to main content
15,894,720 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Is there any way to get CSS, JS and HTML of web page when we hit the URL through our application.

(i.e. hit www.msn.com and I can get css, js and html of page, this can be achieve via C# code)

Application can be console, window and web.

Thanks in Advance :)
Posted
Updated 2-Aug-13 1:56am
v2
Comments
ridoy 2-Aug-13 8:03am    
Such application exists already.Firebug is one of them.
[no name] 2-Aug-13 8:03am    
Generally we use the developers tool for the inspection of the css or js related things. It gets a copy of the css and js file at the local cache.
You can reuse the files from the cache itself.
Ambesha 3-Aug-13 3:23am    
I need to be done by C#

You are listing the resources which are sent to the client side, otherwise your browser would not work with the applications or Web pages.

With .NET, all you need is to use the class the class System.Net.HttpWebRequest:
http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.aspx[^].

Basically, you need to use the techniques of Web scrapping: http://en.wikipedia.org/wiki/Web_scraping[^].

Please see my past answers:
get specific data from web page[^],
How to get the data from another site[^].

—SA
 
Share this answer
 
Quote:
5 Online Playgrounds for HTML, CSS and JavaScript Compared

1) CSSDesk
2) JS Bin
3) jsFiddle
4) Dabblet
5) Tinkerbin

Please check the below link for further details


http://designshack.net/articles/css/5-online-playgrounds-for-html-css-and-javascript-compared/[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900