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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:15:52+00:00 2026-05-29T05:15:52+00:00

In ASP.NET I usually use pageLoad() JavaScript function, that gets executed every time the

  • 0

In ASP.NET I usually use pageLoad() JavaScript function, that gets executed every time the page sends a request even with Ajax (UpdatePanel).

Is there anything like that in Razor?

I mean a JavaScript function to get executed for every ajax request without using OnSuccess or something like that in AjaxOptions.

  • 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-29T05:15:53+00:00Added an answer on May 29, 2026 at 5:15 am

    If you want a javascript function to run every time your page loads then you need to include the script you want at the top bottom of every page you want it to execute on

    Then inside of that you’ll have the js you want to run.

    If you’re using jquery then I suggest using $(document).ready()

    Edit

    Alternatively if you want some csharp/vb to run every time your page loads then you need to create a constructor in your controller and place the necessary code in there.

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

Sidebar

Related Questions

In my asp.net-mvc website I have a field that usually has a string (from
How can I display the circular swirl image, that is usually seen in asp.net
ASP.NET 2.0 provides the ClientScript.RegisterClientScriptBlock() method for registering JavaScript in an ASP.NET Page. The
ASP.NET 1.1 - I have a DataGrid on an ASPX page that is databound
I usually use ASP.net web forms for GUI, maybe one of most stateful technologies.
I usually create ASP.NET websites and have a few classes I use, mainly a
We have Flex applications that connect to our ASP.NET 3.5 Web Applications and usually
Possible Duplicate: Why always close Database connection? I usually use VS2010 and ASP.NET to
I run an ASP.NET application on IIS 6.0. Usually I have compression turned on
How do people usually detect the MIME type of an uploaded file using ASP.NET?

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.