Page object disappears inside event handler

J

Joel

I am having a weird problem with a hidden asp:button when it reaches its
event handler.

Upon clicking the button programmatically in javascript, when I look at the
any objects inside "Page_Load" everything looks OK (ie Page, Session,
Request, Response...).

When the code reaches the buttons event handler I can not access any objects
Page, Session... I get "cannot obtain value".

Has anyone ever seen this? I have other hidden buttons and controls which
all appear to work properly.

As a note: the button is inside a user web control.

Thanks in advance

Joel
 
J

John Saunders

Joel said:
I am having a weird problem with a hidden asp:button when it reaches its
event handler.

Upon clicking the button programmatically in javascript, when I look at the
any objects inside "Page_Load" everything looks OK (ie Page, Session,
Request, Response...).

When the code reaches the buttons event handler I can not access any objects
Page, Session... I get "cannot obtain value".

Where do you get "cannot obtain value"? Do you mean in the debugger? What
happens when you're not in the debugger?

Also, what do you mean when you say that the button is "hidden"? Do you mean
Visible="False"? If so, you should check the page with View Source, as I
suspect that the button did not render.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top