Hi,
I have a server ajax control which inherits RadToolBar control, with OnInit event I popolate items from XML file (the file was taken from the Demo website, so I assume it's format is correct)
When I place the server control on page and run the application I got the following error:
any idea how to solve it?
Avidan
I have a server ajax control which inherits RadToolBar control, with OnInit event I popolate items from XML file (the file was taken from the Demo website, so I assume it's format is correct)
Imports System Imports System.Collections.Generic Imports System.ComponentModel Imports System.Text Imports System.Web Imports System.Web.UI Imports System.Web.UI.WebControls Imports Telerik.Web.UI Public Class GridCommandItem Inherits RadToolBar Protected Overrides Sub OnInit(ByVal e As System.EventArgs) MyBase.OnInit(e) Me.LoadContentFile("ToolBar.xml") End Sub End ClassWhen I place the server control on page and run the application I got the following error:
Server Error in '/' Application. -------------------------------------------------------------------------------- <ToolBar xmlns=''> was not expected. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidOperationException: <ToolBar xmlns=''> was not expected. Source Error: Line 14: Protected Overrides Sub OnInit(ByVal e As System.EventArgs) Line 15: MyBase.OnInit(e) Line 16: Me.LoadContentFile("ToolBar.xml") Line 17: End SubLine 18: Source File: D:\Profiles\bah029\My Documents\Visual Studio 2008\Projects\CommonServerControls\GridCommandItem.vb Line: 16 Stack Trace: [InvalidOperationException: <ToolBar xmlns=''> was not expected.] Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderGridCommandItem.Read1_GridCommandItem() +259 [InvalidOperationException: There is an error in XML document (2, 2).] System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events) +613 System.Xml.Serialization.XmlSerializer.Deserialize(TextReader textReader) +102 Telerik.Web.UI.ControlItemContainer.LoadXml(String xml) +113 Telerik.Web.UI.RadToolBar.LoadContentFile(String xmlFileName) +99 CommonServerControls.GridCommandItem.OnInit(EventArgs e) in D:\Profiles\bah029\My Documents\Visual Studio 2008\Projects\CommonServerControls\GridCommandItem.vb:16 System.Web.UI.Control.InitRecursive(Control namingContainer) +333 System.Web.UI.Control.InitRecursive(Control namingContainer) +210 System.Web.UI.Control.InitRecursive(Control namingContainer) +210 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +378 any idea how to solve it?
Avidan