I'm trying to utilize the sample Telerik projects and am having problems. In VS 2008 I go to File_Open Web Site and go to any of the projects that were installed under the VS Projects folder. I open Solution explorer and configure the site to be a Telerik site which seems to remove all but one error when I do a build. I always get an error "Could not load type 'xxx._Default" with xxx being in the Page line of the Default.aspx web page.
So if this is the header from my web page:
<%
@ Page Language="vb" AutoEventWireup="true" CodeBehind="Default.aspx.vb" Inherits="WebApplication4._Default" %>
I get "Could not load type 'WebApplication4._Default" as an error.
What am I doing wrong?
| protected void Page_Load(object sender, EventArgs e) |
| { |
| // "Content" is a ContentPlaceHolder in a master page |
| Content.Controls.Add(InitializeEditor()); |
| // Add inline scripts for handling commands. etc. |
| RegisterScripts(); |
| // Contains 'EditorLoaded' function, filters, etc. |
| litEditorScript.Text = |
| string.Format("<script src=\"{0}{1}\" type=\"text/javascript\"></script>", |
| URLs.RootPath, "js/ControlsEditMode.js"); |
| } |
| private RadEditor InitializeEditor() |
| { |
| RadEditor re = new RadEditor(); |
| re.ContentFilters = EditorFilters.RemoveScripts | EditorFilters.FixEnclosingP | EditorFilters.FixUlBoldItalic | |
| EditorFilters.MozEmStrong | EditorFilters.ConvertFontToSpan | EditorFilters.ConvertFontToSpan | |
| EditorFilters.IndentHTMLContent; |
| re.ContentAreaCssFile = "~/Sitefinity/Admin/Themes/Default/AjaxControlsSkins/Sitefinity/EditorContentArea.css"; |
| re.ToolsFile = "~/Sitefinity/Admin/ControlTemplates/EditorToolsFile.xml"; |
| re.Skin = "Office2007"; |
| re.NewLineBr = false; |
| re.OnClientPasteHtml = "OnClientPasteHtml"; |
| re.OnClientLoad = "EditorLoaded"; |
| //Css, Font, MSWordRemoveAll |
| re.StripFormattingOptions = EditorStripFormattingOptions.Css | EditorStripFormattingOptions.Font | |
| EditorStripFormattingOptions.MSWordRemoveAll; |
| re.CssFiles.Add("~/style.css"); |
| re.CssFiles.Add("~/designer.css"); |
| re.FlashManager.DeletePaths = new string[] { "~/Files" }; |
| re.FlashManager.UploadPaths = new string[] { "~/Files" }; |
| re.FlashManager.ViewPaths = new string[] { "~/Files" }; |
| re.ImageManager.DeletePaths = new string[] { "~/Images" }; |
| re.ImageManager.UploadPaths = new string[] { "~/Images" }; |
| re.ImageManager.ViewPaths = new string[] { "~/Images" }; |
| re.DocumentManager.DeletePaths = new string[] { "~/Files" }; |
| re.DocumentManager.UploadPaths = new string[] { "~/Files" }; |
| re.DocumentManager.ViewPaths = new string[] { "~/Files" }; |
| re.MediaManager.DeletePaths = new string[] { "~/Files" }; |
| re.MediaManager.UploadPaths = new string[] { "~/Files" }; |
| re.MediaManager.ViewPaths = new string[] { "~/Files" }; |
| return re; |
| } |
| private void RegisterScripts() |
| { |
| Type cstype = GetType(); |
| ClientScriptManager cs = Page.ClientScript; |
| string strPageEditorInline = HttpContext.Current.Server.MapPath(URLs.RootPath + "Sitefinity/Admin/Scripts/PageEditorInline.js"); |
| // Check to see if the client script is already registered. |
| if (!cs.IsClientScriptBlockRegistered(cstype, "PageEditorInline") && |
| File.Exists(strPageEditorInline)) |
| cs.RegisterClientScriptBlock(cstype, "PageEditorInline", |
| File.ReadAllText(strPageEditorInline), true); |
| } |
~/scripts/Common/Core.js
~/scripts/Common/Animation/AnimationScripts.js
~/scripts/Common/Navigation/NavigationScripts.js
~/scripts/Common/Scrolling/ScrollingScripts.js
~/scripts/Common/PopUp/PopUpScripts.js
~/scripts/ComboBox/RadComboBoxScripts.js
~/scripts/Grid/RadGridScripts.js
~/scripts/Menu/RadMenuScripts.js
~/scripts/Editor/RadEditor.js
~/scripts/Dialogs/DialogOpener.js
~/scripts/Editor/Modules.js
~/scripts/Spell/SpellCheckService.js
~/scripts/Editor/AjaxSpellCheck.js
~/scripts/Window/RadWindow.js
~/scripts/ToolBar/RadToolBarScripts.js
~/scripts/Splitter/RadSplitter.js
~/scripts/Splitter/SplitterItem.js
~/scripts/Splitter/SplitterPaneBase.js
~/scripts/Splitter/RadPane.js
~/scripts/Splitter/RadSlidingPane.js
~/scripts/Splitter/RadSlidingZone.js
~/scripts/Splitter/RadSplitBar.js
~/scripts/TreeView/RadTreeViewScripts.js
On a particular page, we are using RadMenu, RadToolbar, RadSplitter, RadGrid, RadEditor and RadComboBox controls. While loading a page, we get javascript error - "Sys.ArgumentException: does not derive from Sys.Component. Parameter name: type". Also, RadSplitter is not getting rendered on the page. However, RadMenu and RadToolbar are getting rendered correctly.
Other pages, where we are using RadEditor and/or RadComboBox, there is no error. Everything works fine.
We suspect some javascript files are missing for splitter or sequence is not correct. Please suggest.
Note that we are using RadControls for ASPNET AJAX Q2 2008.
Thanks,
Bhavin