i made a program for data entry to download any image also pdfs files form any web site so i want any one help me in this project
You're looking for the HTML Agility Pack and the WebClient class.
Related
I have read that it is not possible to read folder content in an ASP.NET MVC application.
I want to compare different folder directories and highlight the differences.
How can I achieve this?
Here is a filesystem API documentation https://developer.mozilla.org/en-US/docs/Web/API/File_and_Directory_Entries_API
But it's supported only by Chrome and Opera http://caniuse.com/#search=filesystem
In a C# application I would like to open a url and download a pdf.
When this url is hit from the browser the page quickly loads and begins what I believe are ajax calls. After several seconds the browser download prompt appears with the pdf file.
I have attempted to open this url via WebClient. The stream I return is not the pdf file and is is the actual html of the page.
How can I detect the the pdf file has loaded and download it?
If I'm not mistaken, WebClient has no clue about JavaScript, it won't run the AJAX code at all, it just gets the HTML of the page and leaves it at that.
And since likely the PDF's URL is parsed by the Javascript or the PDF is generated on demand or even streamed trough Javascript, you really need support for active content.
This seems something like Selenium would be good for. http://www.seleniumhq.org/
It'll spawn either an actual browser and steer that browser to the content you need or run the PhantomJS headless browser and fetch the content you want.
It might be a bit overkill and a more knowledgeable person might have a better answer, but that's what I've used on an application that needs to fetch PDF's, CSV's and other files from many different websites.
You can download html source and web contents(.files folder) by right click and "Save As.." in Internet Explorer on PC.
I'd like to do the same way as IE in Windows Phone.
I know how to download html source using WebClient class. But I cannot still download web contents(.files folder).
Does anyone know how to download html source as well as web contents(.files folder) ?
You need to download all the content of a html source and locate contents like images and download them with webclients, you need to code the biggest part of this idea.
here it is a link of an application which allows user to download images from imageboards :
http://www.windowsphone.com/fr-BE/apps/1d2e7d7c-1bab-4656-9db3-35c868e40cfe
I've a file upload control in my .aspx page. that file upload only allows excel files. after correct file is posted in that control. I'm rendering that control via JavaScript and passing that file to Web service, which has a method to access and do some calculation on that file.
I read some article for that. there is no such a functionality exist to transfer file via client side. Do you have any suggestion?
There is a HTML5 File upload, but only FF, chrome and Safari support these functions.
What you can do is using HTML5 upload with Flash or iFrame post as backup. A plugin with all browser support for jQuery can be found here.
I need to upload a file from a winform application to a website.
I have the winform side ready to go, I just need a little help with the webform side.
Client.UploadFile("http://xxx.yyy.com/data/", "sample.txt");
The file(s) that are to be uploaded, binary files, just need to be dumped into a subdirectory called data
I am stuck on the web page that will receive the file and save it into the directory.
c# and asp.net please
thank you
You don't need a web page for accepting the file being sent to server. Probably the easiest way would be to set up ftp on server and upload file there.
Sample code from msdn: http://msdn.microsoft.com/en-us/library/ms229715.aspx