Confirm dialog and ajax call

Hi,

I have a asp.net ajax enabled. I need to post back the form using ajax after 
user confirmation (dialog box), how can i achive this?

1. On the 'Save ' button (runat=server) , I want to display confirmation 
message 'do you want to save ?" (yes/no)

2. if the user has selected 'yes', i want to post the form using ajax script 
and call code behind method for saving 

Regards,

Naheed
0
Utf
1/31/2010 1:49:01 PM
dotnet.framework.aspnet 1425 articles. 0 followers. Follow

1 Replies
1314 Views

Similar Articles

[PageSpeed] 16

On Sun, 31 Jan 2010 05:49:01 -0800, Mohd Ebrahim
<MohdEbrahim@discussions.microsoft.com> wrote:

>Hi,
>
>I have a asp.net ajax enabled. I need to post back the form using ajax after 
>user confirmation (dialog box), how can i achive this?
>
>1. On the 'Save ' button (runat=server) , I want to display confirmation 
>message 'do you want to save ?" (yes/no)
>
Use the button's OnClientClick handler to call a client-side
Javascript function. You'll have to write this function which will
display the appropriate dialog. 

>2. if the user has selected 'yes', i want to post the form using ajax script 
>and call code behind method for saving 
>
Based the user selection the Javascript method needs to return either
true or false. If false is returned the postback will be automagically
cancelled.

regards
A.G.
0
Registered
1/31/2010 2:45:05 PM
Reply:

Similar Artilces:

Static Library Containing Dialog and Resource
I have a static library that links with the static MFC lib. In this library I create a CDialog and display it. I'm using InitModalIndirect() to create the dialog from a resource template. The resource template is in a BYTE array within the library. Everything works great with the debug build. The dialog displays and handles messages, etc. But when the calling app that links in the static library (a straight Win32 app in this case) exits it gives an Access Violation. Well, this only happens in release build and not the debug build (of course, sigh). I double checked my run-time l...

how we can generate CWnd * from Dialog ID(IDD_DIALOG1)
Hi Guys, How r u, can you please tell me how we can generate CWnd * from Dialog ID(IDD_DIALOG1) , I have used GetDlgItem() but this function is for Window Control on Dialog Box not for Dialog ID. Please tell me i am waiting for your reply. Hi, CDialog is inherited from CWnd,so u can directly use it for calling window functions. Thanks, raghunandan_1081@yahoo.com wrote: > Hi Guys, How r u, can you please tell me how we can generate CWnd * > from Dialog ID(IDD_DIALOG1) , I have used GetDlgItem() but this > function is for Window Control on Dialog Box not for Dialog ID. Please > ...

calling SetWindowPos on dynamically created control doesn't work ?
CMyDialog::OnInitialDialog(...) { m_btnDynamic.create(m_hWnd, ..... ); BOOL bRet = ::SetWindowPos(GetDlgItem(IDOK), m_btnDynamic.m_hWnd, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE); //this doesn't work //BOOL bRet = ::SetWindowPos(GetDlgItem(IDOK), GetDlgItem(IDCANCEL), 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE); this works } doesn't anyone know the reason? First off, it's kind of dangerous to embed GetDlgItem() that way, but I'll assume you were doing that just for the sake of illustration :o) I'm not sure what you are trying to do with this call. Are you tryi...

Calling checklinks in Dexterity
Is this possible? To call checklinks on a particular logical table in a dexterity script? And not have it try to print a report? Alternatively, are there other methods of automatically kicking off a checklinks? Thanks for the help! - Chad Chad You can call the CL_ global procedures directly. Look at the parameters document in the SDK for a list of the procedures and their parameters. The SDK (Software Developer Kit) is on the \Tools\SDK (or \DSDK) folder on the CD two of the install disks. David Musgrave [MSFT] Senior Development Consultant MBS Services - Asia Pacific Microsoft...

Create a window from a dialog
I want to create a window on the press of a button in a dialog box Sachin Shah wrote: > I want to create a window on the press of a button in a dialog box Oh great!! Create it. When are you going to do that? -- Murali Krishna what is the problem?. explain what you want to do exactly Sachin Shah wrote: > I want to create a window on the press of a button in a dialog box Kareem.tk@gmail.com wrote: > what is the problem?. explain what you want to do exactly > Sachin Shah wrote: > > I want to create a window on the press of a button in a dialog box when a button is pr...

ODBC
I have an application that pulls some update packets and builds some tables in a SQL Server Express database based on the pulled packets. The application uses DAO, to detect if tables/fields are already created (from a previous update pull), and it uses DAO to create any missing tables/fields. I've never had any trouble with this until I installed the product on Vista. Now when I pull the update packets and the software reads them and tries to apply any changes to my database I get a "Error while trying to create table <table_name>: ODBC -- call failed" error. I'm sure...

"Waiting..." Dialog Box after print call?
Hey. I was wondering if people get a "Waiting..." pop-up dialog box when printing. It only happens when there is a whole lot on the screen to print. It occurs after the Printing Properties Window disappears. The problem is, the "Waiting..." dialog appears on the printed document. Is there a way to set this not to pop-up? I looked at OnPrint, OnDraw, etc. and did not see anything on it. Any help would be appreciated. Thanks... It depends on how you are obtaining the bitmap. If you are grabbing the screen bitmap, for example, you you should grab it before you...

Can't suppress "Server Busy" dialog
Hi, there are about 1.000 newsgroup postings about that "Server busy" notification window, which appears when calling CoCreateInstance. I think that I did everything correctly, but I can't get it working. I have the following call: hr = CoCreateInstance(CLSID_ScilApiClass, NULL, CLSCTX_SERVER, IID_IScilApiClass, (void**)&m_pScilApiClass); The component is a DCOM hosted on a different server. I have a client/server application and the above code is part of a function which gets called every 10 seconds to check whether the connection is still there. If I unplug the n...

Looking for Statistical add in called PHStat
I'm taking a Statistical analysis course and the text references loading PHStat add in to perform one sample tests, probability distributions, confidence intervals, etc. ...

Dialog and Edit Control
Hi all, I have a problem with an app creted with VS2005. I have 2 Dialogs. The main one loads a Txt file and with a button "view file", i show this file in an "Edit Ctrl" of other Dialog. 1) This "Edit Ctrl" don´t understand CR and LF codes and all the file is shown in the same line. 2) I don´t know why but the horizontal Scrollbar cannot be activated. does anybody know why? How could i solve it? Thanks in advance and excuse me for my bad english ;). if vc++,first try to set the properties of edit box by click on properties>>style tab >&g...

got a follow-up call from MSFT support mgr
This afternoon I received a follow-up call from a MSFT support manager. He said he was reviewing his call logs and noted how long the call had lasted. He was checking on the service and whether an "acceptable" resolution was identified. I stated, "I reverted to a pre-update 2 .mny file" and reconverted. I also took the liberty to point out the poor product development and complaints noted on this message board. I stated I have used Money since 1996 and that this was the worst Microsoft product I have ever used (including Winblows 98 and ME). He did say they had...

Import dialog box freeze after import
Hi, I am trying to import contacts to MS CRM from a file. However contacts are imported to MSCRM and everything is fine. But import progress dialog box freezes forever even after i can see all the contacts in CRM. when i click cancel on dialogbix it asks to revert imported records. Has any one faced this problem. Please let me know work around for this problem. ...

BUG: Outlook treats new message window as a dialog box
Applies to: Outlook 2000/2002/2003 (possibly also earlier versions, but not tested) Tested with: OL 2000 on Windows 98 SE OL 2003 on Windows XP Pro SP2 SYMPTOMS When Outlook is called externally to create a new message, it will treat the new message window as a dialog box. This has the consequence that the whole application is locked until one disposes of the "dialog box" either by sending the message or closing it. An alternative scenario is such that Outlook is not running, and the call is made to create a new message. In such case, if one attempts to start Outlook, one gets the...

error dialog loading Outlook 2002
error on loading Outlook 2002: The add-in "C:\Documents and Settings\Trudy\Application Data\Microsoft\I..."could not be installed or loaded. This problem may be resolved by using Detect and Repair on the Help menu. Unable to load "C:\Documents and Settings\Trudy\Applicat..."You may be out of memory, out of system resources, or missing a .dll file. I click ok and everything seems ok. THis started happening after I reinstalled a PIM that synchronizes with Outlook. It used to work fine; then it complained about something. I reinstalled it and now the synching wo...

How to tab into the list view (set focus to one of its items) within a dialog
Within a dialog, I have a listview. I will like to set tab order to tab into listview and set focus to one of its items. It is easy to set tab order on other controls of dialog. But I don't how to tab into the listview. Any idea? Thanks in advance. Leo There is nothing special about a list view. Just set the tab order to go there. Doing the initial selection is harder; you probably have to do that explicitly in OnInitDialog. joe On 4 Jul 2003 11:39:23 -0700, pkujchliu@yahoo.com (Leo) wrote: >Within a dialog, I have a listview. I will like to set tab order to >tab into listvi...

dialog box startup question
Hi, I'm trying to create a dialog box that calls a function. As the function runs, a progress bar on the dialog will progress, and the dialog will also have a cancel progress button to stop the function. So, I've created a modal dialog. However, I don't know how to start my function. That is, if I call my function in the dialog constructor, the dialog is not drawn yet. So I want to call my function (which has callback functions to update the progress bar) as soon as the dialog box is drawn and ready to go. Where do I do this? Should I be using a modeless dialog? If so, how? Any...

Shortcut keys not working when I minimize & maximize the Dialog
Hi all, In my MFC application I have a dialog which has some tab order to its controls & some of them have shortcuts & they work properly.But when I minimize the dialog & maximize it,the shortcut keys are not working. once if I click on any of the controls on the dialog,then the shortcuts will work. This is because once I minimize & maximize the dialog the focus is not on any of the control.How can I set the tabfocus onto controls after maximizing the dialog. Note: not working even I press ALT combination. Thanks in Advance. Call m_YourWnd.SetFocus() ...

Can a VBA Function be used to execute (call) a Macro?
Does anyone know if a VBA Function can be used to execute (call) a Macro? How would you do this? A VBA function IS a macro. What exactly are you trying to do? On Tue, 23 Nov 2004 06:11:02 -0800, RKGriffin <RKGriffin@discussions.microsoft.com> wrote: >Does anyone know if a VBA Function can be used to execute (call) a Macro? How >would you do this? I am using the "Function," below, which appears to be different than a "Sub" Routine type Macro, because in a sub-routine I can call another sub-routine and in this thing, I can't. Actually, all I want thi...

displaying jpegs and bmps in a dialog box
What control should I use to display a bmp or jpeg in a dialog box? I used the GDI+ api's to do it. "William Gower" <w_gower@hotmail.com> wrote in message news:uFtq$2WgDHA.2352@TK2MSFTNGP09.phx.gbl... What control should I use to display a bmp or jpeg in a dialog box? hi, for BMP you can use Picture control. for jpeg refer the following link. it gives an introduction to gdi+; http://www.codeproject.com/vcpp/gdiplus/GDIPlusControl.asp anu. ...

File Dialog Using API
I have users using the run-time version of access which does not allow the newer (access 2002 and up) FileDialog functions. I found great information about using a direct call to the API from http://www.mvps.org/access/api/api0001.htm on another post in this forum. Unfortunately, the code is a little over my head but I was able to tweek it open a selected file. Is there any way to allow it to select mulitple files? This is a fairly essential part of my program as users typically have to open about 5 different files at one time. PS: Thanks to everyone in the forum, this has been...

how to adjust the tab order of a dynamically created dialog item?
is it possible? >is it possible? Yes, use SetWindowPos to alter the z-order. Dave ...

colour picker dialog
I can't seem to find a colour picker dialog on MSVS 2005 for MFC. Can somebody please let me know? Are you looking for CColorDialog? AliR. "wanwan" <ericwan78@yahoo.com> wrote in message news:1181678692.303347.254970@o11g2000prd.googlegroups.com... >I can't seem to find a colour picker dialog on MSVS 2005 for MFC. Can > somebody please let me know? > There is one built in CColorDialog and a ton of custom ones: http://www.codeproject.com/miscctrl/uucolorpicker.asp http://www.codeproject.com/miscctrl/colourpickerxp.asp This one is in a "button&quo...

Page range in Print dialog
Can anyone please explain how I can print, say, pages 1-3 of a 7-page email trail? It seems strange to me that Outlook only allows you to select "Odd", "Even" or "All" pages - which is not what I want at all, when all other Office products allow complete flexibility in specifying print page ranges. Cheers, BigAl (email: a.savage(removethisbit)@bigpond.net.au ) ...

Service Call entry/update window and its tables
Hi, I am trying to find the service call entry - labor table as well as the third party table information( that shows the third party and their reference number) that is linked to the service call entry/update window. I am having no luck finding them and if anyone knows the names of these tables in the sql database it would be appreciated. Thanks Toby ...

How do I call a HTTPRequest "GET" ?
I just want to send a HTTPRequest "get" to get a file. I tried using the MSXML library, but this doesn't work with the mac, s I need to find an alternative solution. Anyone have any pointers ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com ...