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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:24:44+00:00 2026-05-27T21:24:44+00:00

I add JQuery to my asp.net webpage. I can’t understand the run order compleletly.

  • 0

I add JQuery to my asp.net webpage. I can’t understand the run order compleletly. So I write the foolowing code to test it. In any case, Page_Load will run first than $(document).ready(), is it right?

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="Js/jquery-1.7.1.min.js" type="text/javascript"></script>

    <script type="text/javascript">
        $(document).ready(function () {
            alert('Hell');
        });
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
    </div>
    </form>
</body>
</html>



using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Default2 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Label1.Text = "World";
        }
    }
}
  • 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-27T21:24:45+00:00Added an answer on May 27, 2026 at 9:24 pm

    Page_Load is a server-side event. $(document).ready() is client-side.

    The server events which render the page will always run first. The server events may run additional times in response to asynchronous postbacks, but the initial rendering will always happen from the server to the client, not the other way around.

    There is no direct relationship between the two events, i.e. the existence of one doesn’t really require the existence of the other. You could write an ASP.NET page which rendered content to a binary stream (and thus had no document events), or you could write a plain HTML page which had no server code (and no OnLoad method).

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

Sidebar

Related Questions

I want to build a webpage containing jquery draggables in asp.net (c#). How can
I'm trying to add some JQuery to an ASP.Net User Control to check to
I'm using jquery file upload to upload images to asp.net server (http://www.webtrendset.com/2011/06/22/complete-code-example-for-using-blueimp-jquery-file-upload-control-in-asp-net/) I need
I have an asp.net webpage, with a jQuery datepicker on it. I am in
I have an application in asp.net with jquery mobile. In this application people can
I am trying to just add a reference to jquery in my ASP.NET project,
I write ASP.NET application and I want to use jQuery DataTables. In Master Page
I am exploring ASP.NET MVC and I wanted to add jQuery to make the
am trying to add jQuery Grid into my application(C# and Asp.net) using samples provided
I am trying to implement the jQuery datetimepicker in my ASP.NET webpage. Followed the

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.