One of the reasons you can get the undefined function may be if you defined the jquery library more than once.
<script src="/Scripts/jquery-1.10.2.min.js"></script> <script src="/Scripts/bootstrap.min.js"></script> <div class="modal fade" id="registermodal" aria-hidden="true"> ... ... </div> <script src="/Scripts/jquery-1.10.2.min.js"></script>
The bootstrap library is applied to the first jquery library, but when you reload the jquery library, the bootstrap load is lost (the modal function is in bootstrap).
One of the common causes of this problem is the inclusion of partial blocks of code in a web application, since the same link to a javascript file can appear in several places in the full page release. This is especially dangerous when your js definitions are scattered throughout your page, i.e. in the head, in the upper body and in the lower body (in a partial template).
Brad baskin
source share