Solved

Modal Pop from Code

Posted on 2014-11-27
3
680 Views
Last Modified: 2014-12-01
I have a bootstrap modal popup which is called by data-target="#modalAddIVSubmission"

   <asp:LinkButton ID="LinkButton1" runat="server" data-toggle="modal" data-target="#modalAddIVSubmission" CausesValidation="False" CommandName="Select" Text="View"></asp:LinkButton>

Open in new window



I want to get this to pop from code but cannot get it to work.

Can anyone suggest how I get it to pop in asp.net VB code via a selected change event?

I have tried

    Protected Sub GridView1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles GridView1.SelectedIndexChanged
        modalAddIVSubmission.show()
    End Sub

Open in new window



but this does not work.   Help please!

Thanks
0
Comment
Question by:edjones1
3 Comments
 
LVL 9

Expert Comment

by:teebon
ID: 40470047
Hi edjones1,

Can you share the codes of your control "modalAddIVSubmission"?
0
 
LVL 19

Accepted Solution

by:
Manoj Patil earned 500 total points
ID: 40470791
Hi check these links.
 
http://www.aspsnippets.com/Articles/Open-Show-jQuery-UI-Dialog-Popup-Window-from-Server-Side-Code-Behind-in-ASPNet.aspx

http://www.aspdotnet-suresh.com/2014/05/show-jquery-modal-popup-from-code-behind-server-side.html

Add below code to display it

Protected Sub btnShowModal_Click(ByVal sender As Object, ByVal e As EventArgs)
ScriptManager.RegisterStartupScript(Me, [GetType](), "Show Modal Popup", "showmodalpopup();", True)
End Sub

Open in new window

0
 

Author Closing Comment

by:edjones1
ID: 40473235
WorksPerfectly, thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

864 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now