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

  • SEARCH
  • Home
  • 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 6862555
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:40:32+00:00 2026-05-27T02:40:32+00:00

I am facing a problem storing original values of a form. I have a

  • 0

I am facing a problem storing original values of a form.

I have a form with number of Text boxes.All these textboxes binds with a single Entity.
For e.g.

Class Car
{
     private int Light;
     private int TailLight;
     private int Seats;
     private int Gears;

} 

Now one text box will bind with Light, one with TailLight and so on.

On page load these text boxes are filled with some values, and user has an option to edit these text boxes and save the data. Now before saving these data i need to check the OriginalValues (on pageload) with the edited values. I am not able to find a way to store these original values anywhere. No matter where i save the original values the data get changed to the edited value at the end, i understand this is because we are giving reference.

Can anybody suggest a way to solve this……

  • 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-05-27T02:40:33+00:00Added an answer on May 27, 2026 at 2:40 am

    Even after doing trial and error lots of different way i could not found a way to do this.

    So i did te same by using DeepCopy, i.e. Seralizing and Deseralizing..

     // Deep clone     
            public static T DeepCopy<T>(this T a)
            {
                using (MemoryStream stream = new MemoryStream())
                {
                    DataContractSerializer formatter = new DataContractSerializer(typeof(T));
                    formatter.WriteObject(stream, a);
                    stream.Position = 0;
                    return (T)formatter.ReadObject(stream);
    
                }
            }
    

    Hope this help others..

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

Sidebar

Related Questions

I am facing some problem in iPhone application development for Reading PDF. I have
These days I'm facing a problem with encoding string from an array of byte.
I have facing problem to access xmlrpc. Whenever I tried to access xmlrpc through
I am facing problem with getting regular expression for grep for these patterns:- 1).what
I am facing problem while trying to open a simple text file in C#.
I am facing a problem regarding audio decoding. I have the SPIMP3 library for
I am facing some problem when i am storing a string called http://juke.com in
I have a bean structure to parse JSon files. I am facing one problem,
I have created a TCP server. I am facing one problem. my TCP Server
Hay.. I am facing a problem, I am getting a string 'strData' which contain

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.