I am using a WebHtmlEditor control in one of my aspx pages.If I work on it in Visual Studio, everything works fine - I can edit in both design and source modes.
But if I open the same ASPX page in Expression Web 2 - this happens:
1) The page actually gets modified - see below for the before and after.2) Expression Web 2 cannot render the WebHtmlEditor - it displays the error "Literal content (' ') is not allowed within a 'Infragistics.WebUI.WebHtmlEditor.HtmlBoxMenuItem"3) If I save the page in Expression Web 2 and then try to compile in Visual Studio 2008, I then get the same error.
It seems that the WebHtmlEditor is not compatible with Expression Web 2. Does anyone know if there's a workaround to use the WebHtmlEditor in Expression Web 2?
----------------------------------------------------------------------------------------------------------
Before opening the ASPX in Expression Web 2:
<ighedit:HtmlBoxMenuItem runat="server" Act="Cut" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"> <Dialog Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></Dialog></ighedit:HtmlBoxMenuItem>
After opening the ASPX in Expression Web 2 (notice the added " "):
<ighedit:HtmlBoxMenuItem runat="server" Act="Cut" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"> <Dialog Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></Dialog> </ighedit:HtmlBoxMenuItem>
Hi Ehuna,
There was a bug submitted for that.
To test, I installed "Expression Web 2" and experimented with attached application. That application contained WebHtmlEditor which version was different from version on my machine, so I had chance to have various exceptions. After experimenting with that software and reading instructions about local bin, etc. I found that problem with " " was triggered by mismatching version defined in <%@ Register ..> and web.config with version of dlls in GAC (or version in local bin).
Please ensure that web site references correct versions of dlls. That should fix your issue.
PSBesides autogenerated " "s, I found another strange thing in "Expression Web 2". If website contained local bin with dlls which versions mismatched with aspx-register and machine did not have matching dlls at all, then "Expression Web 2" might show a custom control in Design view without exceptions. I would expect an exception in this situation.These features of "Expression Web 2" look to me as bugs.
Hi Viktor,
Thanks for following up - I will check the project and make sure the correct versions are in the register tag and in the web.config. I'll let you know the results.
I'm the one that submitted the bug as well - my graphics designers were extremely unhappy they had to use Visual Studio once Expression Web 2 started breaking the ASPX pages.
Hi Emmanuel,
That list looks okay to me. It contains WebUI.Shared.v9.1, WebUI.Design.v9.1, WebUI.WebHtmlEditor.v9.1 and WebUI.WebHtmlEditor.Design.v9.1. To maintain/check GAC I do not use any tool, but plain Windows Explore. GAC is the c:\windows\assembly directory and files located in it can be dragged into it by mouse or removed by delete key. That is more reliable than any help tools.
I am not sure about caching abilities of "Expression Web 2", but those features of VisualStudio is real pain in the neck. In some situations it is next to impossible to get rid of cached dlls and design dlls are the worst. If recompiled/updated control-dlls go to GAC, then I personally before testing any change in designers, do following:1. Close VisualStudio2. If IIS is running, then stop it, or go to TaskManager and kill ASPX in Processes.3. Open Explore and delete all files atC:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files4. Delete all files atC:\Documents and Settings\viktors\Local Settings\Application Data\Microsoft\WebsiteCache4a. VisualStudio2003/2005 had few other places which should be cleaned as well.5. Open test website in VisialStudio.6. (if dlls were registered by external program/installation, then that can be not enough).
Both "Expression Web 2" and VisualStudio are products of Microsoft, so, there is a chance that both of them use caching. I do not know anything about cache locations of Expression. It was quite a challenge to find locations used by VisualStudio, which I listed above. (Though, my guess can be wrong and Expression does not use cache;)
I am not sure what I can do else for you. I tested both Infragistics2...v9.1 and Infragistics35...v9.1 dlls with exactly same results. To test I used attached project which contained 3 files: aspx, aspx.cs and web.config. The aspx contained only one WebHtmlEditor without any extra properties, cs was empty and web.config contained references to dlls.I copied those files to a directory on my machine, adjusted versions in web.config and aspx to match with versions of dlls located on my machine, opened "Expression Web 2". File->Open Site->my directory. Double click on Default.aspx->Design view (WebHtmlEditor appeared fine)->modified properties of editor->saved->closed Expression->Opened it again->opened Default.aspx. WebHtmlEditor appeared as it was saved before without any exceptions or
Viktor Snezhko"] [...]To test I used attached project which contained 3 files: aspx, aspx.cs and web.config.
[...]To test I used attached project which contained 3 files: aspx, aspx.cs and web.config.
Where is the attachment?
I meant project attached to that bug in our system. You mentioned that you submitted a bug for that, so, I assumed that attached project was one which you (user) provided.
Its aspx contained only
<ighedit:WebHtmlEditor ID="WebHtmlEditor1" runat="server"> </ighedit:WebHtmlEditor>
After any modification in designer, many items were added to WebHtmlEditor, so, initial content of aspx did not matter. Editor with multiple items behaved same way as empty.
Viktor,
I never attached any projects - the customer support representative must have created one for you.
For the project that worked for you:
1)What version of Expression Web 2 were you using? I am currently seeing in Help > About: "Microsoft Expression Web 2 (12.0.6329.5000), MSO (12.0.6320.5000)".
2) Were the Infragistics DLLs present in the "bin" directory? This is our current deployment process (Infragistics DLLs come from source control). I am ok changing this process, but I need to know whether you had the DLLs in the bin directory or not.
3) Did you try this on Vista 64 bits? This our current development environment. Blend 2.0 and the WPF XamChart act differently on Vista 64 bits and XP 32 bits - I need to know if this might be the case here as well.
I made some progress - I can now open an ASPX page in Expression Web 2 without getting the " literal content is not allowed" error. Unfortunately, this only works for a simple webhtmleditor control - like this:
<ighedit:webhtmleditor ID="WebHtmlEditor1" runat="server" ImageDirectory="images/htmleditor/"></ighedit:webhtmleditor>
When I try to open a more complex page, where I'm specifying the toolbar items and the right click menu, I get the error again.
I also attach two screenshots that show how both instances of the WebHtmlEditor are properly rendered in Visual Studio 2008, but only the simple control (without any properties set) work in Expression Web 2.
Any other ideas? This does not seem to be a problem with Expression Web 2 or
Emmanuel
Here's what I did so far:
<Reference Include="Infragistics35.WebUI.WebHtmlEditor.v9.1, Version=9.1.20091.2040, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb, processorArchitecture=MSIL"> <HintPath>C:\Program Files (x86)\Infragistics\NetAdvantage for .NET 2009.1\ASP.NET\CLR3.5\Bin\Infragistics35.WebUI.WebHtmlEditor.v9.1.dll</HintPath> <SpecificVersion>False</SpecificVersion> <Private>False</Private> </Reference>
5. Removed all references of Infragistics Dlls from the Web.Config - this included:
Infragistics.WebUI.UltraWebNavigator.UltraWebMenu, Infragistics2.WebUI.UltraWebNavigator.v7.3, Version=7.3.20073.38, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb
<configSections>
<section name="infragistics.web" type="System.Configuration.SingleTagSectionHandler,System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<compilation debug="true" strict="false" explicit="true">
<assemblies>
<add assembly="Infragistics35.WebUI.UltraWebNavigator.v9.1, Version=9.1.20091.2040, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"/>
<add assembly="Infragistics35.WebUI.Shared.v9.1, Version=9.1.20091.2040, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"/>
<add assembly="Infragistics35.WebUI.UltraWebToolbar.v9.1, Version=9.1.20091.2040, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"/>
<add assembly="Infragistics35.WebUI.WebCombo.v9.1, Version=9.1.20091.2040, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"/>
<add assembly="Infragistics35.WebUI.WebHtmlEditor.v9.1, Version=9.1.20091.2040, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"/>
<add assembly="Infragistics35.WebUI.WebSpellChecker.v9.1, Version=9.1.20091.2040, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"/>
6. Verified that the GAC only had the 9.1.20091.2040 versions (of both Infragistics2 and Infragistics35 DLLs).
7. Stopped IIS and deleted all files in C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
8. Deleted all files in C:\Documents and Settings\emmanuel_huna\Local Settings\Application Data\Microsoft\WebsiteCache
9. Verified that no Infragistics DLLs are present in C:\vss\Cep\CepAdmin\main\bin (changed references in Visual Studio Project so "Copy Local = False".
Here's the simple WebHtmlEditor that does work:
Here's the WebHtmlEditor with more complex options defined that does not work:
<ighedit:WebHtmlEditor ID="txtNotes" runat="server" ImageDirectory="images/htmleditor/" FontFormattingList="Heading 1=<h1>&Heading 2=<h2>&Heading 3=<h3>&Heading 4=<h4>&Heading 5=<h5>&Normal=<p>" FontNameList="Arial,Verdana,Tahoma,Courier New,Georgia" FontSizeList="1,2,3,4,5,6,7" FontStyleList="Blue Underline=color:blue;text-decoration:underline;&Red Bold=color:red;font-weight:bold;&ALL CAPS=text-transform:uppercase;&all lowercase=text-transform:lowercase;&Reset=" SpecialCharacterList="Ω,Σ,Δ,Φ,Γ,Ψ,Π,Θ,Ξ,Λ,ξ,μ,η,φ,ω,ε,θ,δ,ζ,ψ,β,π,σ,ß,þ,Þ,ƒ,Ж,Ш,Ю,Я,ж,ф,ш,ю,я,お,あ,絵,Æ,Å,Ç,Ð,Ñ,Ö,æ,å,ã,ç,ð,ë,ñ,¢,£,¤,¥,№,™,©,®,—,@,•,¡,,←,↑,→,↓,↔,↕,↖,↗,↘,↙,,¦,§,¨,ª,¬,¯,¶,°,±,«,»,·,¸,º,¹,²,³,¼,½,¾,¿,×,÷" Width="546px" Height="200px" SecureConnection="True"> <DropDownStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" /> <ProgressBar Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" /> <DownlevelTextArea Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" /> <TextWindow Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" /> <DownlevelLabel Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" /> <RightClickMenu Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"> <ighedit:HtmlBoxMenuItem runat="server" Act="Cut" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"> <Dialog Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></Dialog> </ighedit:HtmlBoxMenuItem> <ighedit:HtmlBoxMenuItem runat="server" Act="Copy" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"> <Dialog Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></Dialog> </ighedit:HtmlBoxMenuItem> <ighedit:HtmlBoxMenuItem runat="server" Act="Paste" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"> <Dialog Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></Dialog> </ighedit:HtmlBoxMenuItem> <ighedit:HtmlBoxMenuItem runat="server" Act="PasteHtml" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"> <Dialog Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></Dialog> </ighedit:HtmlBoxMenuItem> <ighedit:HtmlBoxMenuItem runat="server" Act="CellProperties" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"> <Dialog InternalDialogType="CellProperties" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></Dialog> </ighedit:HtmlBoxMenuItem> <ighedit:HtmlBoxMenuItem runat="server" Act="TableProperties" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"> <Dialog InternalDialogType="ModifyTable" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></Dialog> </ighedit:HtmlBoxMenuItem> <ighedit:HtmlBoxMenuItem runat="server" Act="InsertImage" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"> <Dialog Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></Dialog> </ighedit:HtmlBoxMenuItem> </RightClickMenu> <Toolbar Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"> <ighedit:ToolbarImage runat="server" Type="DoubleSeparator" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></ighedit:ToolbarImage> <ighedit:ToolbarButton runat="server" Type="Bold" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></ighedit:ToolbarButton> <ighedit:ToolbarButton runat="server" Type="Italic" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></ighedit:ToolbarButton> <ighedit:ToolbarButton runat="server" Type="Underline" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></ighedit:ToolbarButton> <ighedit:ToolbarImage runat="server" Type="Separator" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></ighedit:ToolbarImage> <ighedit:ToolbarImage runat="server" Type="Separator" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></ighedit:ToolbarImage> <ighedit:ToolbarButton runat="server" Type="Cut" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></ighedit:ToolbarButton> <ighedit:ToolbarButton runat="server" Type="Copy" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></ighedit:ToolbarButton> <ighedit:ToolbarButton runat="server" Type="Paste" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></ighedit:ToolbarButton> <ighedit:ToolbarImage runat="server" Type="Separator" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></ighedit:ToolbarImage> <ighedit:ToolbarButton runat="server" Type="Undo" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></ighedit:ToolbarButton> <ighedit:ToolbarButton runat="server" Type="Redo" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></ighedit:ToolbarButton> <ighedit:ToolbarImage runat="server" Type="Separator" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></ighedit:ToolbarImage> <ighedit:ToolbarButton runat="server" Type="Indent" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></ighedit:ToolbarButton> <ighedit:ToolbarButton runat="server" Type="Outdent" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></ighedit:ToolbarButton> <ighedit:ToolbarImage runat="server" Type="Separator" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></ighedit:ToolbarImage> <ighedit:ToolbarButton runat="server" Type="OrderedList" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></ighedit:ToolbarButton> <ighedit:ToolbarDialogButton runat="server" Type="FontColor" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"> <Dialog Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></Dialog> </ighedit:ToolbarDialogButton> <ighedit:ToolbarDialogButton runat="server" Type="FontHighlight" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"> <Dialog Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></Dialog> </ighedit:ToolbarDialogButton> </Toolbar> <TabStrip Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" /> </ighedit:WebHtmlEditor>
Ok, I figured it out! In addition to everything I did above, I made sure that certain Infragistics tags were not across multiple lines - for example, inside the <toolbar> property, instead of:
<ighedit:ToolbarDialogButton runat="server" Type="FontColor" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"> <Dialog Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></Dialog> </ighedit:ToolbarDialogButton>
I deleted the carriage return/line feeds and made sure the tag was in one line - like this:
<ighedit:ToolbarDialogButton runat="server" Type="FontColor" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"><Dialog Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></Dialog></ighedit:ToolbarDialogButton>
Saved it and boom! - the moment I opened it in Expression Web 2 there were no errors and the WebHtmlEditor rendered in Design mode.
The forums software only lets me "attach" one URL/screenshot, here's the second one where the WebHtmlEditor with properties works fine in Visual Studio 2008.
Also I was getting an error at runtime, so I had to add this back to the Web.Config (under compilation > assemblies):