Click here to Skip to main content
15,894,291 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i'm using asp.net with c#. I have a bootstrap modal popup. I want to close it in code behind.

Here my code:

XML
<script type="text/javascript">
     function Closepopup() {
         $('#mpSearch').modal('close');

     }
</script>


code behind

C#
ScriptManager.RegisterStartupScript(this, GetType(), "Close Modal Popup", "Closepopup();", true);



Error shows : TypeError: f[b] is not a function
Posted
Updated 31-May-16 21:06pm
v2

1 solution

To close, try $('#mpSearch').modal('hide');
 
Share this answer
 
Comments
amnk.info 4-Aug-15 3:11am    
thanks Abhinav. ur code working but when i click show popup it's blinking now.

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