Note that there are some explanatory texts on larger screens.

plurals
  1. POCustom Control Enum property problems
    text
    copied!<p>I have a solution with two projects:</p> <ul> <li><code>CustomControls</code> has custom controls (.cs files)</li> <li><code>WebPages</code> has aspx pages</li> </ul> <p>One of the controls has a property like this:</p> <p>---- Defined in <code>Platform.CustomControls</code> namespace -------</p> <pre><code>[Category("Search Mode"), DefaultValue(SearchTextBoxModeEnum.global), Personalizable(PersonalizationScope.Shared), TypeConverter("String"), WebBrowsable(true), WebDisplayName("SearchTextBoxMode"), WebDescription("SearchTextBoxMode")] public SearchTextBoxModeEnum SearchTextBoxMode { set; get; } </code></pre> <p>---- Defined in <code>Platform.CustomControls.Interface</code> namespace -------</p> <pre><code>public enum SearchTextBoxModeEnum { global, forms, products, internet } </code></pre> <p>This project builds successfully.</p> <p>When I reference this project in my Webpage project and add the property in the control markup, all the other enums appear but "internet" does not appears in intellisense.</p> <pre><code>&lt;Platform:searchtextbox id="SearchTextBox3" runat="server" SearchTextBoxMode="internet" pagename="xyz"&gt; &lt;/OnlinePlatform:ecmssearchtextbox&gt; </code></pre> <p>I get an error while running the page in a browser:</p> <blockquote> <p>Cannot create an object of type Platform.CustomControls.Interface.SearchTextBoxModeEnum' from its string representation 'internet' for the 'SearchTextBoxMode' property.</p> </blockquote> <p>I checked all the details with the added reference (in object browser and ILDASM.exe and I can see the property).</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload