0

i have set a message box button yes/no. i want when i click on button yes then save the value in database and when i click on no then donot save.

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by Mitja Bonca
0
if (DialogResult.Yes == MessageBox.Show("Do you want to save into a database?", "Question", MessageBoxButtons.YesNo, MessageBoxIcon.Question))
            {

                //SAVE into database
            }
            else
            { 
            //not saving! then you dont even need this else (you can erase it if you dont need it
            }
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.