| <telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1" AutoPostBack="false" SelectedIndex="0" CssClass="tabStrip"> | |
| <Tabs> | |
| <telerik:RadTab Text="Tools" NavigateUrl="../../pages/tools.aspx"> | |
| </telerik:RadTab> | |
| <telerik:RadTab Text="Washers" NavigateUrl="../../pages/washers.aspx"> | |
| </telerik:RadTab> | |
| </Tabs> | |
| </telerik:RadTabStrip> | |
| </div> | |
| <div id="ContentContainer"> | |
| <asp:ContentPlaceHolder id="PlaceHolderMain" Visible="true" runat="server" /> | |
| <div class="clear"></div> | |
| </div> |
| <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SplitterTests.aspx.cs" Inherits="Test2.SplitterTests" %> |
| <%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml" style="height:100%" > |
| <head id="Head1" runat="server"> |
| <title></title> |
| </head> |
| <body style="height:100%;margin:0px" scroll="no"> |
| <form id="form1" runat="server" style="height:100%;margin:0px"> |
| <asp:ScriptManager ID="ScriptManager1" runat="server"> |
| </asp:ScriptManager> |
| <script type="text/javascript"> |
| function ChangeUrl(sender, args) { |
| var pane = $find("<%= RadPane2.ClientID %>"); |
| pane.set_contentUrl(args.get_newValue()); |
| } |
| </script> |
| <telerik:RadSplitter ID="RadSplitter1" Runat="server" Height="100%" Width="100%" Orientation="Horizontal"> |
| <telerik:RadPane ID="RadPane1" Runat="server" Width="100%" BackColor="Aqua" Height="30px">RadPane1 |
| </telerik:RadPane> |
| <telerik:RadPane ID="RadPane2" Runat="server" BackColor="BlueViolet" Height="100%"> |
| <telerik:RadSplitter ID="RadSplitter2" runat="server" Height="100%"> |
| <telerik:RadPane ID="RadPane3" runat="server" BackColor="Beige"> |
| </telerik:RadPane> |
| <telerik:RadSplitBar ID="RadSplitBar1" runat="server" /> |
| <telerik:RadPane ID="RadPane4" runat="server"> |
| </telerik:RadPane> |
| </telerik:RadSplitter> |
| </telerik:RadPane> |
| </telerik:RadSplitter> |
| </form> |
| </body> |
| </html> |
| protected static string FormatMetric(object oValue, object oFormat) { |
| string f = oFormat.ToString(); |
| try { |
| double v = Convert.ToDouble(oValue); |
| return v.ToString(f); |
| } |
| catch { |
| return ""; |
| } |
| } |
| <telerik:RadToolTip ID="RadToolTip1" runat="server" Width="390px" Height="70px" |
| TargetControlID="Button1" Animation="Fade" Position="TopRight" Skin="Default"> |
| <img src="NewFolder1/test.jpg" alt=" " /><img src="NewFolder1/PDF.bmp" |
| style="width: 50px; height: 50px" /> |
| </telerik:RadToolTip> |
Hey folks.
For you guys struggling with one of the following errors (or both if you try to render a new ScriptManager)
- Only one instance of a ScriptManager can be added to the page.
- The control with ID 'xx' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it.
The solution is to make sure that the ScriptManager is rendered BEFORE the given RAD Control, and that only one ScriptManager exists. The following code snippet should achive this:
protected override void CreateChildControls()
{
if (ScriptManager.GetCurrent(this.Page) != null)
{
this.sm = ScriptManager.GetCurrent(this.Page);
}
else
{
this.sm = new ScriptManager();
this.Controls.Add(this.sm);
}
}
Now make sure the ScriptManager is rendered BEFORE the controls needing it (ie RadEditor)
protected override void Render(System.Web.UI.HtmlTextWriter writer)
{
this.sm.RenderControl(writer);
this.radEditor.RenderControl(writer);
}
Hopefully this will be helpful to someone else.