Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7910435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T12:52:07+00:00 2026-06-03T12:52:07+00:00

I have a page that I need to call from another page more that

  • 0

I have a page that I need to call from another page more that one time. The important thing is to execute the Page_Load method. the first page have this code (The first page name is Call.aspx):

  Dim objWebClient As New WebClient
                        objWebClient.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)")
                        Dim objStream As Stream = objWebClient.OpenRead("D:\confirm.aspx")
                        Dim objSR As New System.IO.StreamReader(objStream)
                        objWebClient.Dispose()
                        objStream.Dispose()

This should call the other page. It does not execute the other page. I have the following code to make sure that the confirm page is executed:

 Dim objWrite As New System.IO.StreamWriter("c:\aa.txt")
        objWrite.WriteLine("Hello")
        objWrite.Close()

But there is no output. Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T12:52:10+00:00Added an answer on June 3, 2026 at 12:52 pm

    What is this doing?:

    objWebClient.OpenRead("D:\confirm.aspx")
    

    Is D:\ a reference to a web address? It looks like you’re just calling the file itself, which isn’t going to have the effect you’re looking for. (Ignoring for a moment the file residing in the root of a drive…)

    ASPX pages aren’t executable in and of themselves. A web server (IIS, usually) has to handle the requests for them and pass those requests through the .NET runtime, etc., in order to handle the server-side processing. The file itself is just text, it has no internal means to interpret server-side code. That’s what a web server is for.

    In order to make a web request to a web resource (a page, or any other web resource), you need to use a web URL. Something like: http://localhost/confirm.aspx So that page will need to be served somewhere by a web server.

    More to the point, however, is the fact that you shouldn’t have to do this. If code needs to be shared by two pages, that code should be extracted into a shared component. A “page” should never have to “call another page” (unless they’re on completely separate servers and you’re going for more of a SOA approach). Both pages should call a single shared component (a class, usually, maybe in its own assembly or just in the web project that has the pages).

    Business logic doesn’t go in pages. Only UI goes in pages. Shared business logic goes in business classes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created one aspx Page from that i need to access the property
I have a nice page that does everything I need. However one of the
I have a page that I need to design in PhP/Html/Java/CSS that has to
I have a timed page that I need to use to submit a form
I have a page/gsp that displays 3 different classes. This means that I need
I have an iframe on a page that I need to initially have a
I have a page with multiple YouTube embedded players that I need to listen
I have a long URL on a web page in Windows that I need
I have a document that my asp.net page is creating and I need to
I have an asp.net web service that I want to consume from another asp.net

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.