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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:45:55+00:00 2026-05-31T05:45:55+00:00

On_Load is being called twice in a page. After using Firebug I found that

  • 0

On_Load is being called twice in a page. After using Firebug I found that it requests

http://localhost/default.aspx

then it does another request to

http://localhost/default.aspx#ced3db

I search for "#ced3db" and found it in a <table> in the page. When I remove its background attribute, the problem disapears.

<table width="430" height="281" border="0" 
    background="#ced3db" cellpadding="0" cellspacing="0">

I used a style attribute to avoid requesting the page twice. But, I still need to know: why there are two requests being made? I would like to understand the root cause to avoid re-requesting a page, because it can make any website slower.

Edit: The question has nothing to do with inline styles vs. using CSS files. It is about avoiding unintentionally re-requesting the page for performance reasons.

Note: On_Load can be called twice for several reasons, See ASP.NET Page.OnLoad executes twice

  • AutoEventWireUp is true and you override On_Load.
  • A user control contains AutoEventWireUp with true. Did not try that.
  • The page or master page contains <img src="#"> or <img src="">
  • 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-31T05:45:56+00:00Added an answer on May 31, 2026 at 5:45 am

    I’m pretty sure the background attribute for a table element expects a URL of an image. (I don’t think it’s even a proper attribute for that element, or at least I’ve never seen it used. Might have browser-specific behavior.)

    If that’s the case, then this kind of makes sense. At the end of the question you note:

    • The page or master page contains <img src="#"> or <img src="">

    So that seems to be what’s happening here. The browser is interpreting that color tag as a URL and making a request back to the server resource to try to fetch it, since a hash URL by itself defaults to the current page. In an anchor tag it would just move the focus to that tag on the page, but in a resource-reference tag (such as an img, but in this case an attribute on table which expects a URL) it has to make another request.

    Update: A little Googling on the attribute turns up a number of pages similar to this one, which seem to indicate that it is expecting a URL.

    Indeed, the table element doesn’t seem to officially have a background attribute. At least not in HTML 4 or HTML 5.

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

Sidebar

Related Questions

I am using jQuery to disable validation controls in an aspx page on load.
We are using the Sharepoint.OpenDocuments.EditDocument2 ActiveX control and method. The method is being called
There is a page with several php queries being called... each php query pulls
I am rendering 100 events in FullCalendar using $('#CalendarPlugin').fullCalendar('renderEvent', {} ); being called 100
We're implementing a new solution in our classic ASP environment that's using COM interop
how do i implement paging on xml data which is being called through php.
On an Aspx page, I have this markup (setup for a jQuery UI dialog):
Is there anyway to prevent onbeforeunload from being called when clicking on mailto link
Have patience with me, I'm still learning Cocoa Touch. Other -viewDidLoad not being called
I have a Stored Procedure that returns three record sets. Here it is being

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.