Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Modal Pop from Code

Posted on 2014-11-27
3
Medium Priority
?
833 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
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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

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 article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Integration Management Part 2
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

916 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