473,473 Members | 2,158 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Get data from another website.

I need to go to another website, login with a username/password and
retrieve a page.

The problem is that the site keeps track of the user with a session
variable + cookies.

I've done this in VB using the MS WebBrowser, Navigating to the login
page, setting the values of the textboxes and hitting
theSubmitButton.Click()
Then I just have to retrieve the data from the WebBrowser.

How can I do this in ASP.NET? Or some other way...
Nov 18 '05 #1
4 3239
I recommend using Fiddler to watch exactly what's sent to and from the
server as you log in to the web page:
http://www.fiddlertool.com/fiddler/

Then you can use the HttpRequest method to post to the page and read
the response. You can then post or get other pages in the site.

Session variables are stored on the server, so you can't and won't need
to track them. You will probably need to get and set headers and
cookies, which are accessible via the HttpRequest / Response Headers
and Cookies collections:
http://msdn.microsoft.com/library/de...aderstopic.asp
http://msdn.microsoft.com/library/de...okiestopic.asp
- Jon
http://weblogs.asp.net/jgalloway

Nov 18 '05 #2

"Manuel" <My@No.com> wrote in message
news:We********************@giganews.com...
I need to go to another website, login with a username/password and
retrieve a page.

The problem is that the site keeps track of the user with a session
variable + cookies.

I've done this in VB using the MS WebBrowser, Navigating to the login
page, setting the values of the textboxes and hitting
theSubmitButton.Click()
Then I just have to retrieve the data from the WebBrowser.

How can I do this in ASP.NET? Or some other way...


You may want to take a look at this write up

http://www.west-wind.com/presentatio...webrequest.htm

Mike
Nov 18 '05 #3
This is also good if you need to handle ASP.NET forms authenticated
login:
http://odetocode.com/Articles/162.aspx

Nov 18 '05 #4
That is an excellent reference!
I used it awhile back and it actually worked.
Good explanation as to what is going on.
--
Joe Fallon

"jongalloway" <jo*********@gmail.com> wrote in message
news:10**********************@z14g2000cwz.googlegr oups.com...
This is also good if you need to handle ASP.NET forms authenticated
login:
http://odetocode.com/Articles/162.aspx

Nov 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Steve | last post by:
Hi all i am just starting to get back into VB and i need a little help. I am writing a program that asks a user to type in a set of numbers/letters (in this case shipping containers). Once the...
10
by: Noozer | last post by:
Below is some ASP, HTML and javascript. It is part of a page used to maintain a small database. This code did work at one time, but has since stopped. For some reason the data on my form is not...
1
by: Aliza Klein | last post by:
Hi. A client of mine has a website with a standard "Contact Us" form page with name, address etc. The information is currently sent via email to the client and is then data entered into their...
5
by: Chris | last post by:
I have a meetings section I'm developing on our intranet. Using PHP/MySQL. Meeting info and Meeting docs reside on 2 related tables in the db. Users may want to upload anywhere from 1 to 10 or...
9
by: Jeff Gardner | last post by:
Greetings: I have an UPDATE query (php 5.1.6/mysql 5.0.24a on apache 2.2) that appears to execute with no errors (php,mysql, or apache) but the data in the "UPDATED" table doesn't change. I've...
7
by: Atul | last post by:
Hi Theres a website that books hotels . user enters the information and according to that results are displayed to the user.Let it be website A. Now I want to create a new project with...
4
by: Boki | last post by:
Hi All, I need to let user type some text in a textbox, and user will click a button to submit the material. It is very straightforward if we implement it by single thread. But the...
6
by: dboyerco | last post by:
I'm working with a company that is tracking my vihicle and they have an API that will allow me to log into their database and retrieve the location of my vihicle, which is returned to their website...
4
by: Dave | last post by:
I have a global.asax file with Application_Start defined and create some static data there and in another module used in the asp.net application and I realize that static data is shared amongst...
3
by: BobRoyAce | last post by:
I am using Visual Studio 2008 w/ VB.NET. For the database, I am using SQL Server 2005, which is running on a dedicated server box. I am creating a WinForms application for a client. It is run...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.