Solved

PostBack on OKButton click AJAX Modal PopUp Extender - ASP.NET

Posted on 2011-09-07
2
1,681 Views
Last Modified: 2012-05-12
Hi,

I have a modal popup extender control in my ASP.NET application. I set its property "popupcontrolid="Panel1". Where Panel1 is having OK and Cancel Buttons. I want to postback when OK button is clicked and do NOT want to postback when CANCEL button is clicked. I set modal popup extender control properties like this too:

okcontrolid="OkButton"
cancelcontrolid="CancelButton"

Can you please provide me the code for that ?

Thanks
0
Comment
Question by:milani_lucie
2 Comments
 
LVL 9

Accepted Solution

by:
Grant Spiteri earned 250 total points
ID: 36499800
0
 
LVL 7

Assisted Solution

by:gopaltayde
gopaltayde earned 250 total points
ID: 36516099
<asp:Button ID="OkButton" runat="server" onclick="OkButton_Click" Text="Ok" />
<asp:Button ID="Button1" runat="server" OnClientClick="javascript:return (false);" Text="Cancel" />

instead of return (false); write a javascript function which will close the popup.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
OverviewThis article demonstrates a simple search form using AJAX. The purpose of the article is to demonstrate how to use the same code to render a page and javascript (JQuery) and AJAX to make subsequent calls to refine the results. The princip…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question