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 7788007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:51:17+00:00 2026-06-01T20:51:17+00:00

In my MVC3 application I have many different screens and these all use a

  • 0

In my MVC3 application I have many different screens and these all use a master layout.
Seven of the screens all use the same code such as that below:

<script src="@Url.Content("~/Scripts/x/tiny_mce.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/y/ajaxOnFailure.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/y/tinyMCEOptions.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/z/updateField.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/z/gridClick.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/z/createDialog.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/a/dialogSuccess.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/a/refreshGrid.js")" type="text/javascript"></script>

I would like to have some way of putting all of these lines into an external file and then have them added.

is there some way I can have one file which I add to my razor view and inside that file imports all the javascript files above?

  • 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-01T20:51:19+00:00Added an answer on June 1, 2026 at 8:51 pm

    You could add them to a PartialView, then include the PartialView in the pages you want the scripts to show up on.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My Problem: I have an MVC3 application where all views use a common master
I have an ASP.NET MVC3 application, where I use Entity Framework 4.3 Code-First and
I have a working MVC3 application with different modules. I want to use one
I have been working on mvc3 application and trying to localize the same. I
We have a MVC3 application that we have created many small actions and views
Hi i have solution with many projects in my mvc3 application One of the
I have developed a MVC3 application in that I want use the Check boxlist
I am working on asp.net mvc3 application and have many records coming from database.
i am making an application in MVC3 where in i have many dropdowns Now
In my MVC3 application i have a dropdown list. In there i have to

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.