473,289 Members | 1,723 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,289 software developers and data experts.

Order of loading pages...

Hi, i have a .aspx Page, inside that page is a web user control.

The user control is basically a login control.

if the user is logged in the page shows one thing.
if the user isn't logged in it shows something else (basically telling them
to login)
but i have noticed that when the user logs in through the control, first the
page_load event on the .aspx page is ran,
then the onclick event for the login image event on the web control is
ran...but because of that order, now i need to access the page_load event on
the .aspx page again... is there a way to reference that .aspx page?

thanks
Nov 18 '05 #1
3 1352
You can reference the Parent page that contains the user control using
the syntax Parent.Page. This should give you access to al public
properties and methods of the .aspx page.

Matt
http://www.3internet.co.uk

"Seth Broomer" <as**@asdsd.com> wrote in message
news:e6*************@tk2msftngp13.phx.gbl...
Hi, i have a .aspx Page, inside that page is a web user control.

The user control is basically a login control.

if the user is logged in the page shows one thing.
if the user isn't logged in it shows something else (basically telling them to login)
but i have noticed that when the user logs in through the control, first the page_load event on the .aspx page is ran,
then the onclick event for the login image event on the web control is
ran...but because of that order, now i need to access the page_load event on the .aspx page again... is there a way to reference that .aspx page?

thanks

Nov 18 '05 #2
Sam
If your page class is called Default I believe you can go
((Default)this.Page) and access any properties. Someone else here can
back me up on this.

But there is no way to get back to PageLoad after OnClick of your user
control. See this page for details:
http://aspalliance.com/articleViewer.aspx?aId=134&pId=

However, you should be able set any properties of the page or the user
control in the OnClick event of the user control.

What are you trying to do exactly?

-Sam


"Seth Broomer" <as**@asdsd.com> wrote in message news:<e6*************@tk2msftngp13.phx.gbl>...
Hi, i have a .aspx Page, inside that page is a web user control.

The user control is basically a login control.

if the user is logged in the page shows one thing.
if the user isn't logged in it shows something else (basically telling them
to login)
but i have noticed that when the user logs in through the control, first the
page_load event on the .aspx page is ran,
then the onclick event for the login image event on the web control is
ran...but because of that order, now i need to access the page_load event on
the .aspx page again... is there a way to reference that .aspx page?

thanks

Nov 18 '05 #3
Sorry for taking so long.

I have a login user control on the page.
let say they come to a chat page, and they have a message that says they
first have to login before they can chat. on the left hand side is the login
control where they put their username and password.

they then log in, and the chat page allows them to chat(by basically loading
up a different part of the page)

but i have a bunch of lil' pages like this, so that i can't specifically say
check this page....so i have to reference the parent page. however when i
try and do that, it doesn't like it...

ugh!

"Sam" <sa*******@yahoo.com> wrote in message
news:1a**************************@posting.google.c om...
If your page class is called Default I believe you can go
((Default)this.Page) and access any properties. Someone else here can
back me up on this.

But there is no way to get back to PageLoad after OnClick of your user
control. See this page for details:
http://aspalliance.com/articleViewer.aspx?aId=134&pId=

However, you should be able set any properties of the page or the user
control in the OnClick event of the user control.

What are you trying to do exactly?

-Sam


"Seth Broomer" <as**@asdsd.com> wrote in message

news:<e6*************@tk2msftngp13.phx.gbl>...
Hi, i have a .aspx Page, inside that page is a web user control.

The user control is basically a login control.

if the user is logged in the page shows one thing.
if the user isn't logged in it shows something else (basically telling them to login)
but i have noticed that when the user logs in through the control, first the page_load event on the .aspx page is ran,
then the onclick event for the login image event on the web control is
ran...but because of that order, now i need to access the page_load event on the .aspx page again... is there a way to reference that .aspx page?

thanks

Nov 18 '05 #4

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

Similar topics

5
by: Manish Jain | last post by:
Environment: Windows 2000 Server (SP4), ASP.Net/C# (Framework 1.1) Hardware: PIII @ 700 MHz, 512 MB RAM ----------------------------------------------------------------------------...
5
by: tshad | last post by:
I have a PageInit.ascx that I want to put in all my pages and have it execute only once during the "not IsPostback" section. I also need it to execute first before anything else. I have it set...
3
by: Phil | last post by:
Jerry posed some good ideas, a while back, on website a security issue that comes up often. Gary Jones was asking how to keep users from directly accessing php pages, out of sequence. Jerry...
0
by: vinayakk | last post by:
Hello webies, I have a problem with loading html pages in frameset. I am using location.href to load html pages one by one upon the user request and these pages in turn load flash files. When one...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.