You can't change the type. You could: a) use a placeholder and decide what type of control to add to it. b) write a helper that copied all it's properties from one control type to another in conjunction with a)
If you say runtime, another possibility is to place both in the .ascx and just use FindControl to find the appropriate one prior to setting properties. --- In [email protected], "robrap_1976" <[EMAIL PROTECTED]> wrote: > > > How does one change the control type of a list control programmatically? > > I have an ascx with a dropdown I'd like to be able to choose whether it > renders as a DropDownList or Listbox at runtime. > > Many Thanks Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
