FBML and Server Controls

Aug 16, 2008 at 7:07 PM
I'm using the 2.0 RC2 version of the toolkit with FBML and Master Pages.

When I'm adding a asp:dropdownlist to a content page I get the following runtime error:
Control 'ctl00_Content_ctl00' of type 'DropDownList' must be placed inside a form tag with runat=server.

When I place the asp form-tag inside the master page or the content page I get the error:
A page can have only one server-side Form tag.

There is no other form tag. Has anyone managed to run server controls withing FBML Canvas Pages and the RC2 version?

Thanks for any help and insights,
Aug 18, 2008 at 4:55 AM
Edited Aug 18, 2008 at 4:57 AM
I am also had same problem  I got around it and some of the server controls worked after adding the following code to a page:

        Public Overrides Sub VerifyRenderingInServerForm(ByVal control As System.Web.UI.Control)
            Exit Sub
        End Sub

However I am unable to add a ScriptManager control onto the page now.  I continually get 'object reference not set to an instance of an object'.    -->  System.Web.UI.PageRequestManager.RenderPageRequestManagerScript(HtmlTextWriter writer) +91

Aug 19, 2008 at 4:55 AM

Did this work in past versions of the toolkit?

I can't think of what would have changed to break this.  I have spent time working on these types of problems in the past.  I will try to look into it.

Aug 20, 2008 at 5:48 AM
Thanks for looking into. 

Not sure if worked in the past,  2.0rc2 is the first version i'm trying

Aug 22, 2008 at 3:00 PM
Hi rpowers,

Were you able to get some info on this??

Thanks in advance
Sep 5, 2008 at 10:49 AM
I'm having the same issue, has anyone got this working?
Sep 5, 2008 at 12:29 PM
Edited Sep 5, 2008 at 1:45 PM
Same problem here. I don't know why but it seems that only asp:label works, other server controls like button, dropdown etc, don't work.

I am using latest build - 22331.

Domagoj Barisic
Sep 6, 2008 at 3:05 PM
Here is how I fix this:

- put enableEventValidation="false" in page directive (<%@ Page Language="C#" EnableEventValidation="false" ....) - you can optionally add in web.config, so it will work for all pages (        <pages enableEventValidation="false">)

-in you page code behind overwrite method "VerifyRenderingInServerForm" with no code, like this:

        public override void VerifyRenderingInServerForm(Control control)


Hope this helps.

Domagoj Barisic