Learn how to a build a cloud-first strategyRegister Now


Page_Load not firing

Posted on 2005-04-21
Medium Priority
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

laotzi2000 earned 200 total points
ID: 13839889
try change
<%@ Page Language = "CS" Inherits="CurrencyConverter" AutoEventWireup="false" Src="main.cs" %>
<%@ Page Language = "CS" Inherits="CurrencyConverter" AutoEventWireup="true" Src="main.cs" %>

Author Comment

ID: 13841361
Bingo!  Thanks a lot!

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

810 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