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

Parent page and Custom control

Hi,

I created a custom cuntrol and I want to be able to access the page
object where my control was added (the page that contains my control).
If I use the page object in my custom control or Parent.Page I always
get "Object reference not set to an instance of an object".
Does anybody know how can I do this?

Nov 19 '05 #1
1 1006
My mistake, I was trying to access the Page object on the New event of
my control. All I did was access it on the OnLoad event of the control

Nov 19 '05 #2

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

Similar topics

3
by: Arulraja | last post by:
Hello, I have created 2 custom server controls, The parent custom control contains multiple child custom controls. The Child control has a button on it. If I Click the button control, it...
2
by: Paul Johnson | last post by:
I want a custom control to be able to call a function that is in it parent, is this posible? I have tried things like this.Parent.FunctionName();
4
by: SOS | last post by:
Hi guys , i create a custom control and place it on a web form, how can i access to this web form from my custom control ? for example i want to add a button to this webform by writing code in...
1
by: Earl Teigrob | last post by:
I did a ton of searching to try and find a simple solution to this issue and finally wrote my own, which I am sharing with everyone. In my searching, I did find a very complete and robust solution at...
4
by: TS | last post by:
When i try to access the page class or parent properties inside a server control that is nested in another server control, they are null. I don't even call CreateChildControls for the parent...
3
by: Alan Silver | last post by:
Hello, If I have a page that contains (say) a Literal control and a custom control, can the code in the custom control set the value of the Literal? I tried doing this in the custom...
1
by: David Lozzi | last post by:
Hello, I have a user control that saves data. When the data is saved, I need to call a function in the parent page from the user control to initiate something else. I know I can set it up so...
1
by: Jimi | last post by:
Hi all, I have a user control which I want to raise a custom event from so the parent page can reload a datagrid with some new information. In the 1.1 framework days I would have just done...
1
by: Charles Zhang | last post by:
I created a custom server control that derives from WebControl. I found Parent and Page property are null for the control I created. But Parent is a readonly property so that I have no way to...
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.