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.
Viktor Snezhko"] [...] 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.
[...] 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.
Unfortunately, the Infragistics installers did not clean up the GAC. I had a bunch of older 7.3 Infragistics DLLs in the GAC even after going to Control Panel > Add/Remove Programs > Infragistics 7.3 > Uninstall.
When I tried deleting the Infragistics DLLs in C:\Windows\assembly using Windows Explorer (running as an Administrator) I got "access is denied" errors.
When I used gacview (http://www.nirsoft.net/dot_net_tools/gac_viewer.html) it worked without problems.
Hi Emmanuel,
I have WindowsXP and Microsoft Expression Web 2 (12.0.4518.1084) MSO (12.0.6320.5000).
After cleaning cache used by VisualStudio (directories which I refered before) and opening/closing website in Expressions, I found that Expressions uses exactly same directories as VisualStudio and creates temporary files at those locations.
I tried following: removed dlls for a particular version of WebHtmlEditor (shared, editor, design and editor-design files) from GAC, copied those dlls into local bin, adjusted references in web.config and aspx files in external editor, reboot my machine and opened website in Expressions. I got exception with generated " " similarly as in my initial tests when I had deliberately mismatching dlls. At this point behavior of Expressions became very strange. It started to generate and insert into aspx second Register with short version of dll, like
<%@ Register assembly="Infragistics2.WebUI.WebHtmlEditor.v9.1" namespace="Infragistics.WebUI.WebHtmlEditor" tagprefix="ighedit" %>
Attempts to remove that dummy Register line manually, save aspx, reopened aspx, etc. did not help and Register persisted and it was regenerated again. If sometimes were not generated, then 2 new lines were inserted between tags of WebHtmlEditor on every aspx opening.
I tried to remove WebHtmlEditor (or remove all dummy ) in Code view and switch do design view. Couple of times it worked and after that, the problem with " " disappeared. However, it could happen again after few close/open actions.I experimented with different versions of dlls, with mixed bin and GAC locations, but I could not figure out what exactly triggers that behavior and exception in Expressions. It could unpredictably fall back into bug.
It looks like that Expressions fails to load custom-control-designer dll on the very first opening of aspx (late binding or whatever technology of Microsoft).From my interactions with VisualStudio2008: while testing a website I do not use short versions of dlls in Register and I do not use local bin. Because if control or control-designer dll was recompiled, then VisualStudio2008 designer stops to work. Though, that used to work perfectly in VisualStudio2003/2005. And VisualStudio2003/2005 had opposite problem: local bin worked much better than GAC. Maybe Expressions has similar preferences.
The only reliable case which I found was following
1. clean up cache directories ("WebsiteCache" and "Temporary ASP.NET Files")2. remove all files from bin3. adjust versions in web.config and aspx to version located in GAC4. clean up asxp from (use not corrupted file)5. (maybe usefull) reboot machine
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):
<add assembly="Infragistics35.WebUI.Shared.v9.1, Version=9.1.20091.2040, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"/>
Viktor,
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.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>