![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
i'm curious as to which events should a drop down list's values be loaded and when the correct value should be set selected. And what is the logic behind this timing? thanks!!! |
#3
| |||
| |||
|
|
Subject: Re: where in page life cycle should databound control populate its data? Date: Fri, 16 Nov 2007 16:16:56 -0600 also is there any concerns with AJAX? someone at work said he had to move the code that was binding a drop down list from OnLoad to onPreRender because of an issue with Ajax "TS" <manofsteele1 (AT) nospam (DOT) nospam> wrote in message news:OzdYxmJKIHA.5860 (AT) TK2MSFTNGP04 (DOT) phx.gbl... i'm curious as to which events should a drop down list's values be loaded and when the correct value should be set selected. And what is the logic behind this timing? thanks!!! |
#4
| |||
| |||
|
|
Hi TS, AS for databinding and data population for a control, I think it can be performed at any events before the page render its content. Therefore, all the following page events during the server-side processing is ok: Init, Load, PreRender Actually, from MSDN document, you can get "PreRender" is the last event you can make changes(which will be persisted into viewstate). Also, databinding is not necessarily be performed on every request, only when data changed will you need to perform databinding(or at the first request) since most databound control store bound data into viewstate(for populating control collection in sequential requests). For AJAX, normally, it just do the postback in background thread through xmlhttp, therefore, I think the basic logic mentioned above is also suitable. For particular problem or issue, it will depend on how that problem will affect the page processing or control lifecycle. Sincerely, Steven Cheng Microsoft MSDN Online Support Lead ================================================== Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscripti...ult.aspx#notif ications. Note: The MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 1 business day is acceptable. Please note that each follow up response may take approximately 2 business days as the support professional working with you may need further investigation to reach the most efficient resolution. The offering is not appropriate for situations that require urgent, real-time or phone-based interactions or complex project analysis and dump analysis issues. Issues of this nature are best handled working with a dedicated Microsoft Support Engineer by contacting Microsoft Customer Support Services (CSS) at http://msdn.microsoft.com/subscripti...t/default.aspx. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. -------------------- Subject: Re: where in page life cycle should databound control populate its data? Date: Fri, 16 Nov 2007 16:16:56 -0600 also is there any concerns with AJAX? someone at work said he had to move the code that was binding a drop down list from OnLoad to onPreRender because of an issue with Ajax "TS" <manofsteele1 (AT) nospam (DOT) nospam> wrote in message news:OzdYxmJKIHA.5860 (AT) TK2MSFTNGP04 (DOT) phx.gbl... i'm curious as to which events should a drop down list's values be loaded and when the correct value should be set selected. And what is the logic behind this timing? thanks!!! |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |