The problem with what you are doing is that ASP.NET generates the object
model for the page during the Page_Init event. In order for the server to
dispatch to the event handler for the control, the control must be fully
formed before the Load event happens. If you populate it on the client,
there is no way for the server to know what items are available and
therefore will not dispatch to the event.
In other words, you will have to do this some other way such as storing
information in a hidden field and then process it yourself during the
Page_Load.
"xenophon" <xe******@online.nospam> wrote in message
news:6l********************************@4ax.com...
I created an HtmlSelect in my ASP.NET page template (setting
runat="server" in its tag), double-clicked it in the Designer, and
Visual Studio automagically made the declaration and Event Wireup and
associated method.
However, I use JavaScript on the client to populate the list and a
LinkButton to PostBack. In the Page_Load, there are no items in the
HtmlSelect.
Does anyone have an example of how this should work?
Thanks.