Page object disappears inside event handler

  • Thread starter Thread starter Joel
  • Start date Start date
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
 
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.
 
Back
Top