Solved

Pop Bootstrap Modal On Load MVC

Posted on 2016-08-23
2
64 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
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.

827 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