This is a migrated thread and some comments may be shown as answers.

Does everything require a ScriptManager?

2 Answers 52 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
kieran
Top achievements
Rank 1
kieran asked on 14 Nov 2008, 04:41 PM
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 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 14 Nov 2008, 05:14 PM
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.
0
kieran
Top achievements
Rank 1
answered on 15 Nov 2008, 05:31 PM
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,
Tags
General Discussions
Asked by
kieran
Top achievements
Rank 1
Answers by
Daniel
Telerik team
kieran
Top achievements
Rank 1
Share this question
or