accessing child controls

  • Thread starter Thread starter vespaboy
  • Start date Start date
V

vespaboy

i have a calendar control and i have added a dropdownlist control to
each day using the OnDayRender method:

Dim ddl As DropDownList = New DropDownList
ddl.AutoPostBack = True
....
....
e.Cell.Controls.Add(ddl)

However the autopostback event is not firing, indeed no autopostback
code is added to the rendered <select>.

Can anyone advise how to make autopostback work and to access the
values of each select in the postback.

Thanks in advance

Dan
 
i have a calendar control and i have added a dropdownlist control to
each day using the OnDayRender method:

Dim ddl As DropDownList = New DropDownList
ddl.AutoPostBack = True
...
...
e.Cell.Controls.Add(ddl)

However the autopostback event is not firing, indeed no autopostback
code is added to the rendered <select>.

Can anyone advise how to make autopostback work and to access the
values of each select in the postback.

Thanks in advance

Dan

Auto post back on what event?

ddl.{event_here} += New EventHandler({your_sub_here})
 
Auto post back on what event?

ddl.{event_here} += New EventHandler({your_sub_here})

auto postback on selectedindexchanged. i've tried:

AddHandler ddl.SelectedIndexChanged, AddressOf
ddl_SelectedIndexChanged

but still nothing
 
auto postback on selectedindexchanged. i've tried:

AddHandler ddl.SelectedIndexChanged, AddressOf
ddl_SelectedIndexChanged

but still nothing- Hide quoted text -

- Show quoted text -

Well, I got it... The OnDayRender happends after the PostBack events
are handled. It means you add a control which cannot be fired.
 
Back
Top