Dynamically load an ASP Page

  • Thread starter Thread starter J.Marsch
  • Start date Start date
J

J.Marsch

I'm pretty new to ASP.Net
(server side)
Suppose that I have an instance of an ASP Page class, and I want the
client's web browser to load it.

I don't necessarily know the URL of the page that I have, I just have an
instance of it. How do I make the browser load the page.

If I were writing winform code, it would be something like this:

MyFormClass oForm = new MyFormClass();
oForm.Show();
 
Hello Jeremy,

It seems that you have some misunderstanding here.

In windows forms application, there is a startup point to run the application. After that, the code runs under user interaction, like
typical win32 applications. So you could initialize a form and then show it in the code.

But for asp.net web forms appliation, things are different. It is based on HTTP request/response model. In order to run a
page, you need to request it from a client's browser. After it is request, asp.net wil run server side code and send response to
the client. So there is no way to initialize a page and display it like a windows forms. But, you could use functions to open a
new page in client side, such as showModalDialog.

For details, I suggest you refer to http://msdn.microsoft.com/library/en-
us/vbcon/html/vboriCreatingApplicationsInVBVCs.asp?frame=true.

Thanks very much.

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
!Reply-To: "J.Marsch" <[email protected]>
!From: "J.Marsch" <[email protected]>
!Subject: Dynamically load an ASP Page
!Date: Fri, 1 Aug 2003 14:07:59 -0500
!Lines: 16
!X-Priority: 3
!X-MSMail-Priority: Normal
!X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
!X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
!Message-ID: <[email protected]>
!Newsgroups: microsoft.public.dotnet.framework.aspnet
!NNTP-Posting-Host: 206.52.52.37
!Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:164219
!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
!
!I'm pretty new to ASP.Net
!(server side)
!Suppose that I have an instance of an ASP Page class, and I want the
!client's web browser to load it.
!
!I don't necessarily know the URL of the page that I have, I just have an
!instance of it. How do I make the browser load the page.
!
!If I were writing winform code, it would be something like this:
!
!MyFormClass oForm = new MyFormClass();
!oForm.Show();
!
!
!
!
!
 
Thank you for the info, I'll read up.

Yan-Hong Huang said:
Hello Jeremy,

It seems that you have some misunderstanding here.

In windows forms application, there is a startup point to run the
application. After that, the code runs under user interaction, like
typical win32 applications. So you could initialize a form and then show it in the code.

But for asp.net web forms appliation, things are different. It is based on
HTTP request/response model. In order to run a
page, you need to request it from a client's browser. After it is request,
asp.net wil run server side code and send response to
the client. So there is no way to initialize a page and display it like a
windows forms. But, you could use functions to open a
 
Back
Top