Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Modal Pop from Code

Posted on 2014-11-27
3
Medium Priority
?
814 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:Ed
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 2000 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:Ed
ID: 40473235
WorksPerfectly, thanks
0

Featured Post

Google Certified Professional - Cloud Architect

This course (1 of 3) is designed to help students who are interested in Google Cloud Platform (GCP) to become familiar with the platform, navigate the console and learn its capabilities. It will also prepare students for the Google Cloud Architect certification exam.

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

660 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