View Complete Post
i want to replace ok and cancel button of an alert message with YES an NO button in asp.net web application.When a user will click yes the data will be saved in the database and if user clicks that will act as a reset button and do not save the data in database and the control will move with as usual to the redirect page.Any pointers will be highly appreciated.I am usin g C# language.
This month Paul DiLascia codes some Microsoft Office-style dialog box features.
MSDN Magazine August 2006
After clicking OK or Cancel from the OpenFileDialog, the calling form gets closed not allowing user to push OK on calling form to save changes. Strange thing is, if calling form is opened modeless from main form, this does not happen. But I do
not want this form to be left open modeless.
Here's the code:
Main Form opens form to change a file path
Private Sub AdvancedDatabaseConfigurationToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AdvancedDatabaseConfigurationToolStripMenuItem.Click
Dim formDBPath As New frmDBPath
Private Sub btnBrowse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBrowse.Click
Dim openResult As DialogResult = Me.OpenFileDialog1.ShowDialog(Me)
If openResult = Windows.Forms.DialogResult.Cancel Then Exit Sub
Me.txtNewDBPath.Text = Me.OpenFileDialog1.FileName
When I step through in the debugger, I click OK on the OpenFileDialog, it returns to btnBrowse_Click sub and sets the textbox text, then control passes back to main form sub AdvancedDatabaseConfigurationToolStripMenuI