Wednesday, 15 February 2012

asp.net - Download a file from a WebForm using C# -



asp.net - Download a file from a WebForm using C# -

i need download file website (not written me). have valid username/password access it, , can manually. want create automated procedure (in c#) download periodically.

manually have login, browse download page, select combo box , click "download". link performs postback , returns requested file.

i think should utilize webclient.downloadfile, can't figure out how pass necessary info , request postback right way.

does other website have api?

otherwise, have web request, submitting details in format require, read response, automatically fill in sec form "check combo box", , read response containing file.

alternatively, there browser emulation software out there, such selenium, used website testing. setup test/script on there above you. i'm not sure how handles downloaded files though.

if want route 1, prepared alter programme each time other website changes. , if add together captcha, pretty much screwed.

for ease, stored password in web browser not save of hassle??

c# asp.net

No comments:

Post a Comment