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

  • Home
  • SEARCH
  • 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 6916421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:36:02+00:00 2026-05-27T09:36:02+00:00

If I want to add external javascript file into an aspx page in back

  • 0

If I want to add external javascript file into an aspx page in back end code page, in what page life should I add it? Page_Load? or Page_PreInit?

  • 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-05-27T09:36:03+00:00Added an answer on May 27, 2026 at 9:36 am

    As far as I know it doesn’t mind where you put it. I usually put them in the the Page_PreRender event.

    There are a couple of reason why I do this.

    1. you want to conditionally add Javascript resources based on some condition in your page, so your need your whole page to be loaded. The PreRender event is the perfect time to check some conditions because everything should be loaded and ready to be renderd.

    2. If you for example add them in the PreInit and in your PageLoad you decide to redirect to a different page you executed unnecessary code.

    So even if both points do not apply to the situation I still put them in the PageRender as it’s the guideline for the whole project.

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

Sidebar

Related Questions

I want to add an external JavaScript or CSS file in my test.html dynamically.
I want to add a external third party jar file in the inbuilt android
Can we have external NoScript file? If javascript is not avaialbe i want to
I have a node server and I want to add an external .js file
I have numbers in javascript from 01(int) to 09(int) and I want add 1(int)
I want to add a mailto link on our web page. I want to
Can anyone please guide how can I add a javascript block to page header
I want to put the below html code in my javascript function. I don't
I want to add a tab with content from a page I made to
I'm trying to add an external icon from an *.ico file to a window

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.