467,119 Members | 1,204 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,119 developers. It's quick & easy.

PreRender event

Joe
Hello All:

I have been bitten a few times lately as I've tried to implement
functionality in the Page_PreRender event.

So here is my question: for what purpose do you use the PreRender event?
How do you decide whe to use the PreRender event vs the Unload event?

Any respnse will be welcome.

TIA,
--
Joe
Mar 29 '06 #1
  • viewed: 1805
Share:
2 Replies
Joe,

PreRender is good for formatting the items, calculating totals. You can loop
through the whole collection of items as opposed to the ItemDataBound event
that handles an item at the time.

In the Unload event the items are already gone to the client.

Eliyahu

"Joe" <Jo*@discussions.microsoft.com> wrote in message
news:1C**********************************@microsof t.com...
Hello All:

I have been bitten a few times lately as I've tried to implement
functionality in the Page_PreRender event.

So here is my question: for what purpose do you use the PreRender event?
How do you decide whe to use the PreRender event vs the Unload event?

Any respnse will be welcome.

TIA,
--
Joe

Mar 29 '06 #2
Joe
So, basically, in the PreRender event, since evenything is on the page, I'm
just cleaning up what's there. And since the Unload event occurs after the
page has been sent, I can use it to clean up a database connection or
something else that occurred on the server.

Sound good?
--
Joe
"Eliyahu Goldin" wrote:
Joe,

PreRender is good for formatting the items, calculating totals. You can loop
through the whole collection of items as opposed to the ItemDataBound event
that handles an item at the time.

In the Unload event the items are already gone to the client.

Eliyahu

"Joe" <Jo*@discussions.microsoft.com> wrote in message
news:1C**********************************@microsof t.com...
Hello All:

I have been bitten a few times lately as I've tried to implement
functionality in the Page_PreRender event.

So here is my question: for what purpose do you use the PreRender event?
How do you decide whe to use the PreRender event vs the Unload event?

Any respnse will be welcome.

TIA,
--
Joe


Mar 29 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Alireza Ziai | last post: by
1 post views Thread by DalePres | last post: by
reply views Thread by wardy | last post: by
7 posts views Thread by wardy | last post: by
reply views Thread by Selden McCabe | last post: by
3 posts views Thread by Matt Jensen | last post: by
2 posts views Thread by =?Utf-8?B?WWFua2VlIEltcGVyaWFsaXN0IERvZw==?= | last post: by
reply views Thread by tshad | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.