Calling a webpage from a web app

Posted on 2006-04-25
Last Modified: 2010-04-16
Hi There,

I have a solution with a few projects, one is a web app and one is a console app.

Could someone tell me how it is possible to make a call to a Webpage without actually opening it and then tracking what it gives back?

Question by:Harley84
    LVL 23

    Accepted Solution


    Yes you can use the HttpWebRequest and HttpWebResponse object in the System.Net namespace

    you can use:

    //Invoke request to specified page
    HttpWebRequest webRequ = WebRequest.Create("http://....") as HttpWebRequest;

    //Read response from that page
    HttpWebResponse webResp = webRequ.GetResponse() as HttpWebResponse;

    this might help:
    LVL 10

    Expert Comment

    you can try the web request class in the namesapce

    please try the link
    LVL 10

    Expert Comment

    oops :-) . I have not refreshed Apresto

    LVL 23

    Expert Comment

    No Problemo Prakash :o)

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
    Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
    This video discusses moving either the default database or any database to a new volume.
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now