Page_Load not firing

Posted on 2005-04-21
Last Modified: 2008-02-01
Any idea why the page load event is firing?

file test.aspx:
<%@ Page Language = "CS" Inherits="CurrencyConverter" AutoEventWireup="false" Src="main.cs" %>
      <div style="FONT_WEIGHT: bold" id="Result" runat="server"></div>

file main.cs:
using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

public class CurrencyConverter : Page
      protected HtmlGenericControl Result;
      private void Page_Load(Object sender, EventArgs e)
            if (this.IsPostBack == false)
            Result.InnerText = "Done";

Trying to learn .NET C#... I assume this is an easy question?
Question by:classnet
    LVL 12

    Accepted Solution

    try change
    <%@ Page Language = "CS" Inherits="CurrencyConverter" AutoEventWireup="false" Src="main.cs" %>
    <%@ Page Language = "CS" Inherits="CurrencyConverter" AutoEventWireup="true" Src="main.cs" %>

    Author Comment

    Bingo!  Thanks a lot!

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
    Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now