Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8799583
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T00:21:47+00:00 2026-06-14T00:21:47+00:00

In MVC3 I can easily move the jQuery script tag to the bottom of

  • 0

In MVC3 I can easily move the jQuery script tag to the bottom of the page “_Layout.vbhtml”

<script src="@Url.Content("~/Scripts/jquery-1.8.2.min.js")" type="text/javascript"></script>

However in the ASP.NET MVC3 when you create a Controller with an editor template, the scaffolding mechanism does a good amount of work adding files to the Views folder like Create.cshtml, Delete.cshtml, Details.cshtml, Edit.cshtml, and Index.cshtml etc… and they are strongly typed.

Inside those View files, script tags are inside the <body>, but how can I add those tags to the bottom of the page immediately before </body> tag?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T00:21:48+00:00Added an answer on June 14, 2026 at 12:21 am

    What you are looking for is sections http://weblogs.asp.net/scottgu/archive/2010/12/30/asp-net-mvc-3-layouts-and-sections-with-razor.aspx

    Add a section just above your </body> tag.

    @RenderSection("Scripts", false)
    </body>
    

    Then in your view you can define content that will appear in this section.

    @section Scripts {
        <script>
            ...
        </script>
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Unobtrusive JavaScript with jQuery is available in MVC3.But how can I use the unobtrusive
With the UrlHelper in MVC3, you can build a URL for a controller and
I understand that only 1 RenderBody can exist in the MVC3 layout page however
I'm new to MVC3 and I can't figure out how to use checkboxes in
How can we run a method before running each Action in MVC3? I know
Can you guys please check this code, it is MVC3 Razor <p><strong><u>Skills:</u></strong> @foreach (var
I'm a new bie with MVC3 razor. Can anyone please help me why I
how to load cascading dropdownlist each other asp.net mvc3? how can i do? i
I'm in the process of recreating our website using MVC3. I can not wrap
I have an MVC3 application, I know that for relative paths, I can use

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.