Does everything require a ScriptManager?

3 posts, 0 answers
  1. kieran
    kieran avatar
    19 posts
    Member since:
    Jul 2006

    Posted 14 Nov 2008 Link to this post

    I'm currently evaluating the new suite with a view to standardising our application on it.  My question is -- does every control require a script manager?

    We currently use a combination of a tab control with a set of menus for a standard navigation. If we were to migrate to your controls, it appears that they would have to have a script manager, and therefore be included in a FORM tag. As you cannot have more than one form on a page, this would really cause us a lot of headaches.

    Is there any way to use the Menu, Tab and Multipage controls outside a form?

    Thanks
  2. Daniel
    Admin
    Daniel avatar
    4945 posts

    Posted 14 Nov 2008 Link to this post

    Hello Houls,

    Please examine the following link:
    ScriptManager Enables AJAX In Your Web Apps

    Regarding the second question: It is possible to use controls outside the form tag, but only those that can't cause postback.

    This is valid:

    <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1"
        <MasterTableView> 
        </MasterTableView> 
    </telerik:RadGrid> 

    Not valid:
    <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1"
        <MasterTableView CommandItemDisplay="Top"
        </MasterTableView> 
    </telerik:RadGrid> 

    You will get the following error:
    Control 'xxxx' of type 'xxxx' must be placed inside a form tag with runat=server.

    The Button control inside the CommandItem is causing postback.

    I hope this helps.

    Best regards,
    Daniel
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. kieran
    kieran avatar
    19 posts
    Member since:
    Jul 2006

    Posted 15 Nov 2008 Link to this post

    Very helpful, thank you.

    I was able to place the navigation outside the form, as you suggested, but I still seem to need a script manager (and therefore a form). So my page looks like:

    <custom menu with tabs,menus and multipages>
    -
    - everything else
    -

    Most times, 'everything else' has a form, but often it doesn't, so it appears we'll need to add a form to the pages that currently don't use one -- am I correct?

    Thanks,
Back to Top