Click here to Skip to main content
15,904,153 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have used a jquery panel on my page which uses the hide and slidetoggle functions of jquery. I have a button on that panel and a grid control, as I enter the data in textbox I have given a query on the button to insert that data into the database and bind that table with grid, but as soon as I click the button the panel disappears, please give me some idea such that the panel doesn't disappear on button click.

following is my code snippet.

XML
<script src="Scripts/jquery-1.7.2.min.js" type="text/javascript"></script>
        <script language="javascript" type="text/javascript">
        $(document).ready(function () {
            $("#flip").click(function () {
                $("#panel").slideToggle("slow");
               $("#panel1").hide();
            });
        });
</script>


Confirm Activity


This is my panel which contains the button and Gridview control.
Posted
Updated 4-Apr-14 2:55am
v2

1 solution

Your panel gets hidden because the page is posted back and reloaded. To show the panel again, in the click event handler write javascript/jquery to show the panel again. You can use ScriptManager.RegisterClientScriptBlock to add the script to show the panel.
 
Share this answer
 
Comments
Ni!E$H_WAGH 4-Apr-14 23:22pm    
Thnks Charan Amritpal Singh

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