Control won't serialize

Discussion in 'ASP .Net Building Controls' started by Troy, Mar 4, 2004.

  1. Troy

    Troy Guest

    Hi, I created an assembly with a custom class called myTable that inherits from "System.Web.UI.WebControls.Table" so that I can mark it as serializable. I am attempting to put this control in viewstate but on doing so throws the error:

    'myControlLibrary.myTable' must be marked as Serializable or have a TypeConverter other than ReferenceConverter to be put in viewstat

    Any suggestions

    Thanks

    Troy
     
    Troy, Mar 4, 2004
    #1
    1. Advertising

  2. hi Troy,
    for complex types you need to Customize State Restoration Using ViewState
    and override SaveViewState, LoadViewState, TrackViewState --and then
    manually add your type.

    "Troy" <> wrote in message
    news:...
    > Hi, I created an assembly with a custom class called myTable that inherits

    from "System.Web.UI.WebControls.Table" so that I can mark it as
    serializable. I am attempting to put this control in viewstate but on doing
    so throws the error:
    >
    > 'myControlLibrary.myTable' must be marked as Serializable or have a

    TypeConverter other than ReferenceConverter to be put in viewstate
    >
    > Any suggestions?
    >
    > Thanks.
    >
    > Troy
     
    Alessandro Zifiglio, Mar 6, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Luiz Rafael Fernandes

    Serialize a object inherited Label control

    Luiz Rafael Fernandes, Apr 8, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    438
    Luiz Rafael Fernandes
    Apr 8, 2004
  2. Gordz
    Replies:
    3
    Views:
    3,974
    John Oakes
    Jun 7, 2004
  3. Chad
    Replies:
    4
    Views:
    8,405
  4. Ahab Guirguis

    Serialize web control

    Ahab Guirguis, Dec 16, 2003, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    169
    Jeffrey Tan[MSFT]
    Dec 17, 2003
  5. Stefaan V.

    Serialize Extended Properties in a web control

    Stefaan V., Sep 29, 2004, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    152
    Stefaan V.
    Sep 29, 2004
Loading...

Share This Page