M
Matt Jensen
Howdy all - and seasons greetings
Just wondering, I've recently discovered the PreRender event for .NET (both
for the page and for controls), which seems like a life saver for doing page
data loads that need to occur AFTER event handlers have fired, as well as
after page load and postback. Is this good, bad or common practice?
example
I've got a repeater on the page, and in the header of the repeater I've got
hyperlinks for sorting the repeater and dropdown lists for filtering it, and
therefore the repeater has (I think) to be bound AFTER the hyperlink-click
or dropdownlist-selection-change events, hence pre-render seems to be the
place.
Another case, in the 'job booking system' that I'm building, the job master
needs to be able to change between job master and job worker roles, hence a
role-changing dropdown list at the top of the page, and given the
DDL-selection change events I believe occur after page load, and given in my
case databinding needs to happen after pageload, postback, and after
DDL-selection-change events, PreRender seems to be the ONLY place I can use.
However I've really not seen much about the PreRender event, although there
seems to be a bit around if you're actually searching on the term PreRender.
So I'm slightly hesitant about using it just yet...
Would appreciate any thoughts
Cheers
Matt
Just wondering, I've recently discovered the PreRender event for .NET (both
for the page and for controls), which seems like a life saver for doing page
data loads that need to occur AFTER event handlers have fired, as well as
after page load and postback. Is this good, bad or common practice?
example
I've got a repeater on the page, and in the header of the repeater I've got
hyperlinks for sorting the repeater and dropdown lists for filtering it, and
therefore the repeater has (I think) to be bound AFTER the hyperlink-click
or dropdownlist-selection-change events, hence pre-render seems to be the
place.
Another case, in the 'job booking system' that I'm building, the job master
needs to be able to change between job master and job worker roles, hence a
role-changing dropdown list at the top of the page, and given the
DDL-selection change events I believe occur after page load, and given in my
case databinding needs to happen after pageload, postback, and after
DDL-selection-change events, PreRender seems to be the ONLY place I can use.
However I've really not seen much about the PreRender event, although there
seems to be a bit around if you're actually searching on the term PreRender.
So I'm slightly hesitant about using it just yet...
Would appreciate any thoughts
Cheers
Matt