Click here to Skip to main content
15,867,568 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
My requirement is ,

I have one button in the aspx page when i click on the button it should fetch some data from db and need to do some logic in server side. After processing the data if result is true then i need to call popup1 and if it is false then popup2 with out reloading the page.

Note : using jquery dialog and a div in the same page together to make popup


Thanks in Advance
Posted

What you need is AJAX[^], my friend.
 
Share this answer
 
Here you have to use jQuery Ajax for retrieve the data from the DB, when you click the button.After that load your popups according to the true/false situation.

I hope you're using ASP.net web forms: (sample code snippet)

XML
<script type="text/javascript">
        function getSentence() {
            $.ajax(
            {
                url: "default.aspx",
                data: "get=sentence",
                success: function (data)
 { $("#txtSentence").get(0).value = data; },
error: function () { alert(arguments[2]); }


            });
       }
    </script>


Please check this link for more info : AJAX basics with jQuery in ASP.NET
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900