Is it possible to keep page events from firing

  • Thread starter Thread starter TS
  • Start date Start date
T

TS

i have an issue on page load when sometimes I want to quit processing the
page, but the other events get called like page_prerender and individual
controls' events get fired.

i want to not raise any events after this point in page load. how can i do
that without doing a request.end? (I don't cant do request.end because it
messes up my page footers and stuff that still needs to get sent to the
browser)

thanks!
 
TS said:
i have an issue on page load when sometimes I want to quit processing the
page, but the other events get called like page_prerender and individual
controls' events get fired.

i want to not raise any events after this point in page load. how can i do
that without doing a request.end? (I don't cant do request.end because it
messes up my page footers and stuff that still needs to get sent to the
browser)

thanks!

Will adding a return in the Page_Load work? Just a guess.
 
At the point you want to "turn off" events set a boolean/flag. Then in
each event handler check that flag. If it's set just bypass that
processing (i.e. "if (stopEvents == true) return;").
 
I agree with Bob that you'll have to use some flag to check the flag in
every event handler.

Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Thanks, thats what i'm doing now, just wondering if there was a magic switch
i could turn off :)
 

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

Back
Top