c# - Logging into a website and retrieving data -


i'm building c# application using .net 3.5 require logging in website select options , proceed page contains links excel file. want know how can proceed these steps.

1) load web page (either hidden or visible in window in application, preferred hidden).

2) type in username/password combination , submit them website.

3) choose appropriate options depending on account provided (just need know how can go through check boxes , lists).

4) proceed next page , load file in link (maybe download temp location, read delete).

update:

i have application use @ work following ...

when run application logs server authenticate session. application has button when clicked shows/hides current activity on page using webpage itself.

the application loads page, types username password , submits. authenticates session on server.

but application different somehow, application load webpage (home page) logs in chooses options (i`ll set options depending on page) on next page, there link i`ll load in excel or application (whichever i`ll able do), perform operations on result based on user input.

series of posts , gets using httpwebrequest , httpwebresponse trough.

although not easy task @ all. need tool webpage's "logic", or in other words sniff see how have organize gets , posts. use tool fiddler accomplish task.

once around needs bet , needs posted, can onto programming part.

edit: way can load page trough http get(httpwebrequest), way can login , choose/specify options trough http post (httpwebresponse) if server doesn't use kind of web interface(web services or wcf different matter)

and after when receive response need parse data need using regex or whatever suits needs.

as far excel concerned. if want load excel in application , stuff there's whole api microsoft purpose: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=5124


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

php - How can I edit my code to echo the data of child's element where my search term was found in, in XMLReader? -