Thread: Control Overrides Page

R

Reiner Max

Hello

I would like to be able that my control overrides the complete
live circle of the page. The event is trigger by a Query string
value.

I need that my controls stops the process(events) of the page and all the
other controls.
The Problem for me is that i can overwrite the render method but i will
prevent all
database connections and code from this page and proceed only my code.

So my question is where I can start so the developer
who use this control doesn't need to change his own code
only the properties of my control.

Thanks

Max
 
J

John Saunders

Reiner Max said:
Hello

I would like to be able that my control overrides the complete
live circle of the page. The event is trigger by a Query string
value.

I need that my controls stops the process(events) of the page and all the
other controls.
The Problem for me is that i can overwrite the render method but i will
prevent all
database connections and code from this page and proceed only my code.

So my question is where I can start so the developer
who use this control doesn't need to change his own code
only the properties of my control.

Reiner,

You might want to reconsider the idea of "overriding" the page from inside
of a control which is on the page. It leads to many questions. For
instance, will your control be the only control on the page? If not, then
the normal "page" events should occur for the benefit of the other controls
on the page. Also, what happens in a future version of ASP.NET when the
features of a "Page" change and your control doesn't change to match them?

Also, is it ok with you for the normal control lifecycle to occur for your
control?

Please give us a better idea of what you're trying to accomplish, and maybe
we'll be able to provide better advice. One idea would be for your control
to _be_ a Page (that is, to derive from System.Web.UI.Page). However,
without knowing what you're trying to accomplish, I don't know if that will
work for you.
 

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,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top