Click here to Skip to main content
15,896,493 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Hii Friend
in my applications i implemented gridview export to ppt before exporting it's ask confirmbox if click "yes" it's export otherwise it's can't
here my issue is i am using bootstrap modal box after exporting that modal box is not hiding

iam using this code in .aspx


ASP.NET
<div class="modal hide fade" id="Div3">
                        <div class="modal-header">
                            <button type="button" id="Button31" class="close" data-dismiss="modal" aria-hidden="true"
                                 runat="server">
                                ×</button>
                            <h3>
                                </h3>
                        </div>
                        <div class="modal-body">
                           
                        </div>
                        <div class="modal-footer">
                            
                                  <asp:Button ID="Button3" runat="server" Text="Yes" class="btn btn-primary" 
                                        autopostback="true" onclick="Button3_Click" CausesValidation="False" />
                                    <asp:Button ID="BtnCancel" runat="server" Text="No" class="btn btn-primary" 
                                        autopostback="true" onclick="BtnCancel_Click" />
                               
                        </div>
                    </div>

in code behind i wrote this code

C#
ScriptManager.RegisterStartupScript(this, GetType(), "modalscript", "$('#Div3').modal('hide');", true);

here my issue is
after downloading complete the modal box is not hidig
Posted
Updated 28-Mar-18 8:20am
v3

Try with...
JavaScript
$('#Div3').hide();
 
Share this answer
 
Comments
krish2013 12-Feb-14 7:10am    
hii tedit dash,
i tried that but that's not working
Can you show the C# function code?
krish2013 13-Feb-14 1:49am    
ScriptManager.RegisterStartupScript(this, GetType(), "modalscript", "$('#Div3').modal('hide');", true);
i called this function in code Behind
I need to see the whole function, not this line only.
Try this


ScriptManager.RegisterStartupScript(Page, Page.GetType(), "Div3", "$('body').removeClass('modal-open');$('.modal-backdrop').remove();$('#Div3').hide();", true);
 
Share this answer
 
Comments
Maciej Los 28-Mar-18 14:35pm    
4 years too late...
jem_147 8-May-20 7:30am    
Helped me :)

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