Home All Groups Group Topic Archive Search About

DropDownList in custom control not firing postback :(

Author
14 Feb 2006 11:00 AM
FruitBatInShades
I have a dropdownlist in a custom control that is not rendering the
postback javascript.

Country = New DropDownList
Country.AutoPostBack = True

but the rendered html is as below

<select name="mmEditContact:Country" id="mmEditContact_Country">

Any Ideas?

==========   MISC CODE SECTIONS ================
    Protected Overrides Sub OnLoad(ByVal e As System.EventArgs)
        Me.Page.RegisterRequiresPostBack(Me)
        MyBase.OnLoad(e)
    End Sub

Protected Overrides Sub Render(ByVal output As
System.Web.UI.HtmlTextWriter)
   Ctrl.RenderControl(Output)
end sub

Author
14 Feb 2006 5:37 PM
Teemu Keiski
Hi,

can you show a little bit longer piece of code? Does your composite control
also implement INamingContainer interface (as it contains child controls)?

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke



<FruitBatInSha***@gmail.com> wrote in message
Show quoteHide quote
news:1139914839.279015.112680@g43g2000cwa.googlegroups.com...
>I have a dropdownlist in a custom control that is not rendering the
> postback javascript.
>
> Country = New DropDownList
> Country.AutoPostBack = True
>
> but the rendered html is as below
>
> <select name="mmEditContact:Country" id="mmEditContact_Country">
>
> Any Ideas?
>
> ==========   MISC CODE SECTIONS ================
> Protected Overrides Sub OnLoad(ByVal e As System.EventArgs)
> Me.Page.RegisterRequiresPostBack(Me)
> MyBase.OnLoad(e)
> End Sub
>
> Protected Overrides Sub Render(ByVal output As
> System.Web.UI.HtmlTextWriter)
>   Ctrl.RenderControl(Output)
> end sub
>