473,321 Members | 1,708 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

dialog box in c# 2005

Hi,

I am new to C#.net. I have created a form. Before saving the form data I want to ask confirmation dialog box. "Do you want to save the data ?" and with two buttons
'Yes' - 'No'. If user clicks 'Yes' button form data will be save. If user clicks 'No' button form will be Reset. Can I do this in C# 2005?. How it is and which control I have to use for this ?
Please help me any body.
thank you
Dec 18 '07 #1
2 1094
ssknov
40
hi srinivas

its simple as we do in vb6.0. U can use the messagebox within if block

eg:

if (MessageBox.Show("Are you sure to delete record", "Confirmation", MessageBoxButtons.YesNo,MessageBoxIcon.Question)== DialogResult.Yes)
{
True statements;
}

bye
Dec 18 '07 #2
hi.
u can use javascript function for confirming
call javascript function on the click of save button.
asp.net---

btnsave.attributes.add("onClick","javascriptFuncti on()");

jsfunction in code behind file
javascriptFunction()
{
alert("msg");
}
Dec 18 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: JCO | last post by:
Does anybody have a Download Dialog written in JavaScripts? This is for a website. I've seen it done before.... where you click on what you want and the dialog comes up asking you if you want to...
0
by: Chris Dunaway | last post by:
I successfully installed VS 2005 Professional RTM and am enjoying using it. Occaisionally I have re-compile a solution using VS2003. This solution has a setup project in it. During...
6
by: Bonj | last post by:
Hi How do developers that use the SDK (not full-blown VS IDE) create dialog boxes? Do they type out the DIALOG resource section of the .rc file manually? Use a third-party program? Or cheat,...
4
by: MechSoft | last post by:
Hi, there, I have a multi-threaded non-MFC program that will include a regular dll which would be part of the user interface, possibly a dialog based interface. I would prefer to have the user...
6
by: WhoopDing | last post by:
How do I display a Color Dialog in the client browser? I want the Color Dialog to be displayed when the user clicks a button.
3
by: Funky | last post by:
Hi, I have developed an ASP.NET application which has been running in production for around 3 months without any major glitches. Recently, a user was attempting to upload a rather large CSV file...
1
by: Vipul Pathak | last post by:
Hi Every one, I am working on deployment of a library. When the library installs on a user's machine, I want that the installed assemblies should get listed in the "Add Reference" (AddRef)...
1
by: James | last post by:
CWinFormsDialog in .net 2.0 lets you host a .Net UserControl as a dialog in a managed C++ MDI application. I.e. in the sample: ----------------------------------------------- #include...
3
by: KNC | last post by:
Hi all, I'm developing a website and deployed on webserver, it always display an authentication dialog that user must login with valid Windows user. Would anyone helps to instruct how to...
1
by: =?Utf-8?B?VGVlcmF2ZWU=?= | last post by:
I try to invoke Connection Properties dialog box that Visual Studio 2005 use. The dialog that I said is used in many places such as when developers build connection string in Settings.setting file...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.