473,396 Members | 2,108 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Dynamically load an ASP Page

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();


Nov 17 '05 #1
2 6814
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" <je****@ctcdeveloper.com>
!From: "J.Marsch" <je****@ctcdeveloper.com>
!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: <ef**************@tk2msftngp13.phx.gbl>
!Newsgroups: microsoft.public.dotnet.framework.aspnet
!NNTP-Posting-Host: 206.52.52.37
!Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftn gp13.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();
!
!
!
!
!
Nov 17 '05 #2
Thank you for the info, I'll read up.

"Yan-Hong Huang[MSFT]" <yh*****@online.microsoft.com> wrote in message
news:T8**************@cpmsftngxa06.phx.gbl...
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" <je****@ctcdeveloper.com>
!From: "J.Marsch" <je****@ctcdeveloper.com>
!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: <ef**************@tk2msftngp13.phx.gbl>
!Newsgroups: microsoft.public.dotnet.framework.aspnet
!NNTP-Posting-Host: 206.52.52.37
!Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftn gp13.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();
!
!
!
!
!

Nov 17 '05 #3

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

Similar topics

1
by: Karl Seguin | last post by:
i have a dynamically created user control which contains a non-dynamically created ASP.Net button. When the button is clicked, the event is not fired. I know that the control must be created on...
7
by: Tim T | last post by:
Hi, I have the need to use dynamically loaded user controls in a webform page. I have the controls loading dynamically, and that part works fine. this is the code used in a webform to dynamically...
8
by: Donald Xie | last post by:
Hi, I noticed an interesting effect when working with controls that are dynamically loaded. For instance, on a web form with a PlaceHolder control named ImageHolder, I dynamically add an image...
8
by: simon | last post by:
On code behind file: Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If Not Page.IsPostBack Then Dim ctrl As New LinkButton ctrl.ID =...
1
by: Kamal Jeet Singh | last post by:
Hi Friends !! I am have facing problem in controlling the dynamically created controls on web page. The problem Scenario is Scenario:- My requirement is to load the web user controls on the...
1
by: Kamal Jeet Singh | last post by:
Hi Friends !! I am facing problem in controlling the dynamically created controls on web page. The problem Scenario is Scenario:- My requirement is to load the web user controls on the web...
4
by: Harry | last post by:
Hello, I have a page with a RadioButtonList and a PlaceHolder control. The RadioButtonList's AutoPostBack attribute is set to TRUE and its SelectedIndexChanged event loads one of three...
1
by: Reza Nabi | last post by:
Bakground: I have a webform (LoadCtl.aspx) which loads the user control to a placeholder dynamically based on the ctlName querystring passed in the URL. Webform (LoadCtl.aspx) also passes a...
9
by: netasp | last post by:
hi all, how can I populate one aspx form when page is loading based on page ID? for example: loading page A (to search for VB code) would display labels and texboxes, dropdown lists all related...
7
by: Nathan Sokalski | last post by:
I have a page which I dynamically add several usercontrols (*.ascx files) to using the following code: Public Sub Refresh() For Each section As DataRow In Me.GetSections().Rows...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.