Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2011-09-07
2
Medium Priority
?
1,782 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 1000 total points
ID: 36499800
0
 
LVL 7

Assisted Solution

by:gopaltayde
gopaltayde earned 1000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The most up-to-date version of this article is on my Blog https://iconoun.com/blog/
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Integration Management Part 2
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

886 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