Home All Groups Group Topic Archive Search About

Adding AutoPostBack to a webcontrol

Author
24 Mar 2006 3:14 PM
Thomas Jespersen
Hi

I have a webcontrol, which has a DropDownList and some other controls.

I want to enable AutoPostBack on the DropDownList, but can't figure out how
to do it.

I tried setting myDropDownlist.AutoPostBack = true, but it doesn't make any
differences.

What am I missing.

Thomas

Author
24 Mar 2006 9:27 PM
jeff
Are you setting the postback event on the Page Load method?  Try adding it
at the control level on the page.

<dropdownlist autopostback=true id="ddl" runat="server" />
Author
27 Mar 2006 8:08 AM
Thomas Jespersen
Hi

I do not have a page! It is a webcontrol in a control library (C# only), and
the control is created programmatically. That's my problem.

How do I set AutoPostBack on a control created programmatically?

Thomas