Solved

Modal Pop from Code

Posted on 2014-11-27
3
647 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

708 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

15 Experts available now in Live!

Get 1:1 Help Now