Ext.Net.Tags is not marked as serializable.

  1. #1

    Ext.Net.Tags is not marked as serializable.

     <form id="form1" runat="server">
            <ext:ResourceManager ID="ResourceManager1" runat="server" ShowWarningOnAjaxFailure="true" />
            <ext:Viewport ID="pnlEditor" runat="server" Frame="true" Layout="BorderLayout">
                <Items>
                    <ext:Panel ID="pnlTags" runat="server" Region="Center">
                        <Items>
                             <ext:TagField 
                ID="Tags1" 
                runat="server" 
                Width="500" 
                TypeAhead="true" 
                EmptyText="[Add tags]" >
                <Items>
                    <ext:Tag Value="1" Text="Jack" Icon="User" />
                    <ext:Tag Value="2" Text="Bob" Icon="UserAdd" />
                    <ext:Tag Value="3" Text="John" Icon="UserAlert" />
                    <ext:Tag Value="4" Text="Bill" Icon="UserB" />
                    <ext:Tag Value="5" Text="Ronald" Icon="UserDelete" />
                </Items>
            </ext:TagField>
            <ext:Container runat="server" Layout="HBoxLayout">
                <Items>
                    <ext:Button runat="server" Text="Add Jack" Handler="#{Tags1}.addTag('1');" />
                    <ext:Button runat="server" Text="Add Ext.Net" Handler="#{Tags1}.addTag('Ext.Net');" />
                    <ext:Button runat="server" Text="Remove Jack" Handler="#{Tags1}.removeTag('1');" />
                    <ext:Button runat="server" Text="Set value" Handler="#{Tags1}.setValue(['1', '2']);" />
                    <ext:Button runat="server" Text="Submit" OnDirectClick="SubmitHandler" />
                </Items>
            </ext:Container>
                        </Items>
                    </ext:Panel>
                </Items>
            </ext:Viewport>
        </form>
    
    protected void SubmitHandler(object sender, DirectEventArgs e)
        {
            string tags = "";
    
            foreach (Tag tag in Tags1.Tags)
            {
                tags += " " + tag.Text;
            }
    
            X.Msg.Alert("Tags", tags).Show();
        }
    After running the above example, when I click on button to read the values at CodeBehind, I get this:

    Server Error in '/' Application.

    Type 'Ext.Net.Tags' in Assembly 'Ext.Net, Version=2.4.0.30091, Culture=neutral, PublicKeyToken=2e12ce3d0176cd87' is not marked as serializable.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Runtime.Serialization.SerializationExceptio n: Type 'Ext.Net.Tags' in Assembly 'Ext.Net, Version=2.4.0.30091, Culture=neutral, PublicKeyToken=2e12ce3d0176cd87' is not marked as serializable.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:


    [SerializationException: Type 'Ext.Net.Tags' in Assembly 'Ext.Net, Version=2.4.0.30091, Culture=neutral, PublicKeyToken=2e12ce3d0176cd87' is not marked as serializable.]
    System.Runtime.Serialization.FormatterServices.Int ernalGetSerializableMembers(RuntimeType type) +11031795
    System.Runtime.Serialization.FormatterServices.Get SerializableMembers(Type type, StreamingContext context) +230
    System.Runtime.Serialization.Formatters.Binary.Wri teObjectInfo.InitMemberInfo() +121
    System.Runtime.Serialization.Formatters.Binary.Wri teObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder) +182
    System.Runtime.Serialization.Formatters.Binary.Wri teObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder) +51
    System.Runtime.Serialization.Formatters.Binary.Obj ectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck) +540
    System.Runtime.Serialization.Formatters.Binary.Bin aryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck) +131
    System.Runtime.Serialization.Formatters.Binary.Bin aryFormatter.Serialize(Stream serializationStream, Object graph) +12
    System.Web.UI.ObjectStateFormatter.SerializeValue( SerializerBinaryWriter writer, Object value) +2785

    [ArgumentException: Error serializing value 'Ext.Net.Tags' of type 'Ext.Net.Tags.']
    System.Web.UI.ObjectStateFormatter.SerializeValue( SerializerBinaryWriter writer, Object value) +3364
    System.Web.UI.ObjectStateFormatter.Serialize(Strea m outputStream, Object stateGraph) +118
    System.Web.UI.ObjectStateFormatter.Serialize(Objec t stateGraph, Purpose purpose) +71
    System.Web.UI.ObjectStateFormatter.System.Web.UI.I StateFormatter2.Serialize(Object state, Purpose purpose) +8
    System.Web.UI.Util.SerializeWithAssert(IStateForma tter2 formatter, Object stateGraph, Purpose purpose) +40
    System.Web.UI.HiddenFieldPageStatePersister.Save() +106
    System.Web.UI.Page.SavePageStateToPersistenceMediu m(Object state) +108
    System.Web.UI.Page.SaveAllState() +659
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1225

    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.33440
    Last edited by GKG4; Feb 07, 2014 at 7:07 AM.
  2. #2
    Thanks for the report, the issue occurs if Viewstate is activated only
    Fixed in SVN
  3. #3
    Quote Originally Posted by Vladimir View Post
    Thanks for the report, the issue occurs if Viewstate is activated only
    Fixed in SVN
    Umm... that means, we need to wait till next release, as I am using free version, coz I use it for fun :)
    Any idea, when can we have the next release? Just idea will be okay, not asking for exact date.


    Edited:

    Got it, I just need to set ViewStateMode="Disabled" and its working :)
    Will there be any other impact of this ?
    Last edited by GKG4; Feb 07, 2014 at 3:43 PM.

Similar Threads

  1. Replies: 0
    Last Post: May 14, 2013, 10:05 AM
  2. [CLOSED] Store record being marked as dirty
    By GLD in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Apr 10, 2012, 7:34 PM
  3. Replies: 0
    Last Post: Jul 19, 2011, 3:15 PM
  4. [CLOSED] Get Marked rows of data
    By majestic in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Oct 21, 2009, 10:08 AM
  5. [CLOSED] Cell Selection image marked
    By speedstepmem2 in forum 1.x Legacy Premium Help
    Replies: 9
    Last Post: May 01, 2009, 6:04 AM

Tags for this Thread

Posting Permissions