My Problem is am not getting customhtmlEditor control ID in aspx.cs page, its getting error like:The Name "Editor1" does not exist in context.
AM using VS 2008, Asp.net version 2.0 and my application is Web Appliaction Project.
My Code Here:
I created custom HtmlEditor control using class file, here code
using AjaxControlToolkit.HTMLEditor;
namespace VMS.App_Code
{
public class customEditor : Editor
{
public customEditor()
{
}
protected override void FillTopToolbar()
{
TopToolbar.Buttons.Add(new AjaxControlToolkit.HTMLEditor.ToolbarButton.Bold());
TopToolbar.Buttons.Add(new AjaxControlToolkit.HTMLEditor.ToolbarButton.Italic());
TopToolbar.Buttons.Add(new AjaxControlToolkit.HTMLEditor.ToolbarButton.Copy());
TopToolbar.Buttons.Add(new AjaxControlToolkit.HTMLEditor.ToolbarButton.Cut());
TopToolbar.Buttons.Add(new AjaxControlToolkit.HTMLEditor.ToolbarButton.BulletedList());
TopToolbar.Buttons.Add(new AjaxControlToolkit.HTMLEditor.ToolbarButton.FixedBackColor());
TopToolbar.Buttons.Add(new AjaxControlToolkit.HTMLEditor.ToolbarButton.FontSize());
}
protected override void FillBottomToolbar()
{
BottomToolbar.Buttons.Add(new AjaxControlToolkit.HTMLEditor.ToolbarButton.DesignMode());
BottomToolbar.Buttons.Add(new AjaxControlToolkit.HTMLEditor.ToolbarButton.PreviewMode());
}
}
}
and register in .aspx Page like following:
<%@ Register Namespace="VMS.App_Code" TagPrefix="custom" %>
Please Help me,
In advance Thanks,
Tekk
Dipa AhujaPosted Jun 4, 2010, 8:31 AM
Dipa AhujaPosted Jun 8, 2010, 11:45 AM
tekkPosted Jun 8, 2010, 5:07 AM
Now custom html editor control is working in web application, Problem is, missing assembly attribute in register tag of Default.aspx Page.
Now another problem is arise:
Font size and Font name control value listing is not coming while using custom html editor. only coming "default" value. What to do,
Please help me,
here custom html editor code:
namespace VMS
{
public class customEditor : Editor
{
public customEditor()
{
}
protected override void FillTopToolbar()
{
TopToolbar.Buttons.Add(new AjaxControlToolkit.HTMLEditor.ToolbarButton.Bold());
TopToolbar.Buttons.Add(new AjaxControlToolkit.HTMLEditor.ToolbarButton.Italic());
TopToolbar.Buttons.Add(new AjaxControlToolkit.HTMLEditor.ToolbarButton.Copy());
TopToolbar.Buttons.Add(new AjaxControlToolkit.HTMLEditor.ToolbarButton.Cut());
TopToolbar.Buttons.Add(new AjaxControlToolkit.HTMLEditor.ToolbarButton.BulletedList());
TopToolbar.Buttons.Add(new AjaxControlToolkit.HTMLEditor.ToolbarButton.FontName());
TopToolbar.Buttons.Add(new AjaxControlToolkit.HTMLEditor.ToolbarButton.FontSize());
}
protected override void FillBottomToolbar()
{
BottomToolbar.Buttons.Add(new AjaxControlToolkit.HTMLEditor.ToolbarButton.DesignMode());
BottomToolbar.Buttons.Add(new AjaxControlToolkit.HTMLEditor.ToolbarButton.PreviewMode());
}
}
}
Thanks in advance
Tekk
tekkPosted Jun 7, 2010, 1:07 AM
Thanks for response.
Dipa AhujaPosted Jun 6, 2010, 9:48 AM
tekkPosted Jun 5, 2010, 10:12 AM
Thanks for reply,
What you attached customhtmleditor example is working fine in Website application. but when i create project of web applaiction its not working. you can try, create new project of web application and see.
Dipa AhujaPosted Jun 5, 2010, 8:52 AM
tekkPosted Jun 5, 2010, 7:53 AM
Thanks for reply,
I created Asp.net Web application project. In that Default.aspx.cs file getting "ajaxcontroltoolkit Namespace" intellisense, but not getting in App_Code of Class file "customcontrol",
Dipa AhujaPosted Jun 5, 2010, 7:22 AM
tekkPosted Jun 5, 2010, 2:55 AM
Thanks for reply,
Lets clear what i done. I created new project [not New website] in VS 2008 under that selected Asp.net web application. now i created App_Code Folder in root directory and under that created customEditor class file. In customEditor class file not getting intellisense AjaxControlToolkit.HTMLEditor namespace.
Working fine customcontrol html editor using through Website Type But not in Project Type. What is problem please help me.
Note:I included ajaxcontroltoolkit in "References" of My project.
Thanks in advance
Dipa AhujaPosted Jun 4, 2010, 8:13 AM
tekkPosted Jun 3, 2010, 8:42 AM
Thanks for reply,
I created custom control in App_code folder under that customEditor class file. and App_Code folder is loacted in root directory of VMS Project.
You said no, use VMS.App_Code namespace in aspx.cs. In intellisense VMS only getting but App_Code not getting, What to do,
Please help me,
Thanks in advace
Tekk
Dipa AhujaPosted Jun 3, 2010, 7:57 AM