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 8893797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:20:20+00:00 2026-06-14T23:20:20+00:00

After retriving the data from database, When I click the Update button there will

  • 0

After retriving the data from database, When I click the Update button there will raise a messagebox as “Changes has done.Do u like to proceed” with Yes/No buttons. But i want to raise the message box when I made any changes only. If i didn’t make any changes it should not raise.. Please help me how to know the changes in my textboxes and comboxes.
My code for raising is

DialogResult result = MessageBox.Show("Chanes has done, Do you wish to save changes.?", "Message",MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (result == DialogResult.Yes)
{
// HERE MY UPDATE CODE.
}
  • 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-14T23:20:21+00:00Added an answer on June 14, 2026 at 11:20 pm

    You’ll need to store the original values as strings, then compare these to the resulting values.

    Alternatively a simpler implementation could just set a boolean isDirty flag to true on the text box changed event, and reset to false on a successful update.

    Example code to help highlight what’s needed included below:

    if(ValuesHaveChanged())
    {
        DialogResult result = MessageBox.Show("Data has been changed, do you wish to save changes?", "Save Changes",MessageBoxButtons.YesNo, MessageBoxIcon.Question);
        if (result == DialogResult.Yes)
        {
            // HERE MY UPDATE CODE.
            ResetChangeDetection();
        }
    }
    

    .

    private bool ValuesHaveChanged()
    {
        return this.isDirty;
        /*
        return ! 
        (
            this.savedName.Equals(NameTextbox.Text)
            && this.savedAddress.Equals(AddressTextbox.Text)
        )
        */
    }
    

    .

    private void ResetChangeDetection()
    {
        this.isDirty = false;
        //this.savedName = NameTextbox.Text;
        //this.savedAddress = AddressTextbox.Text;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm populating data from my database into my JTable. After I add new data
I am testing a database storage after retrieving data from the internet, I would
After retrieving data from a database I find myself doing this to create a
Hi I have a sqlite3 database full of data from my previous version of
I'm creating a caching system to take data from an SQLite database table using
I'm planning to create an VB.net application for retrieving data from a database (MS
I'm working with some data which is being retrieved from my database. It's placed
After successfully opening Pop3Folder , and retrieving messages from it, I then sometimes get
In our project we have requirement that, after receiving sms message from third party
I have applications(WinForm) that gets some objects from webservice. After receiving array I transform

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.