Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8996585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:46:26+00:00 2026-06-15T23:46:26+00:00

hallo iam getting this error message when the page is load, Type ‘messageBox’ in

  • 0

hallo iam getting this error message when the page is load,

Type ‘messageBox’ in Assembly ‘App_Code.e9hyffkh, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null’ is not marked as serializable.

iam new in asp.net , and i can find what iam going worng!

heres my code:

public partial class home : System.Web.UI.Page
{
public string val = "";
public string data = "";

protected void Page_Load(object sender, EventArgs e)
{
    val = "";
    if (!IsPostBack)
    {
        ViewState["Messages"] = new List<messageBox>();
    }

}
protected void ListBox1_SelectedIndexChanged(object sender, EventArgs e)
{

}
protected void Button1_Click(object sender, EventArgs e)
{

    var messages = (List<messageBox>)ViewState["Messages"];

    if (text1.Text == "")
    {
        val = "נא הכנס שם";
    }
    else
    {
        messages.Add(text1.Text);
        val = "נוסף בהצלחה";
    }

    ListBox1.DataSource = messages;
    ListBox1.DataBind();
    ViewState["Messages"] = messages;
    data = messages.Count.ToString();

    text1.Text = "";


}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T23:46:27+00:00Added an answer on June 15, 2026 at 11:46 pm

    Add [Serializable] attribute on top of your messageBox class.

    For reference: SerializableAttribute Class

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

on the following ajax code iam getting a Access is Denied error message.Can somebody
I was trying Ant.echo(hello gant) but I am getting this error message: No such
Hello I am getting this error - 'Error converting data type nvarchar to bigint'
Any ideas why I am getting this error? (Yes, I looked up the error,
hello I am getting this error when using cygwin to try to make, this
I am getting this error: SyntaxError: hello.rb:13: syntax error, unexpected tIDENTIFIER public HelloWorld( InputStream
I found a client/server code and I am getting this error: java.net.SocketException: Software caused
I am getting this Logcat: 08-14 11:42:55.923: W/System.err(1137): org.json.JSONException: Value {error:0,success:0,tag:helloworld} of type org.json.JSONObject
I'm outputting XML in CakePHP. But I'm getting this error when I put my
I am getting this broken pipe error when I try to run one of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.