Solved

Pop Bootstrap Modal On Load MVC

Posted on 2016-08-23
2
71 Views
Last Modified: 2016-08-24
I use to use this using webforms to pop a modal on load

    Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
        ScriptManager.RegisterStartupScript(Me, [GetType](), "Show Modal Popup", "$('#modalSearch').modal('show');", True)
    End Sub

Open in new window


Can anyone tell me how to do it using MVC
0
Comment
Question by:edjones1
2 Comments
 
LVL 11

Accepted Solution

by:
louisfr earned 500 total points
ID: 41768284
I would put it in the page directly.
<script type="text/javascript">
    $(function() {
        $('#modalSearch').modal('show');
    });
</script>

Open in new window

0
 

Author Closing Comment

by:edjones1
ID: 41768341
Perfect
0

Featured Post

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

713 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