Solved

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

Posted on 2011-09-07
2
1,691 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
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…

820 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