how to get page HTML at client side or through javascript in Asp.net Application. Means if I want to get the html of http://www.yahoo.com on client side through javascript or any other
how to get page HTML at client side or through javascript in Asp.net Application.
Share
You can’t get the HTML source of a page on a different hostname from JavaScript, for security reasons (the Same Origin Policy).
So unless you’re Yahoo, you would have to run a proxy on the server-side that will fetch http://www.yahoo.com/ and then return its content to the client side via a string in a
<script>block, or in the response to an XMLHttpRequest (also best JSON-encoded). This is known as a cross-domain proxy.