Confirm dialog and ajax call

  • Thread starter Thread starter Mohd Ebrahim
  • Start date Start date
M

Mohd Ebrahim

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
 
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.
 
Back
Top