473,395 Members | 1,680 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Page Load Does Not Run

Hello, I am walking through the ASP.Net book by Dino Esposito. I created a
new project and used the "add existing" option to add the files to my new
project. He had all of the code on a single page and I split into the form
and codebehind. I place a "break point" on the page load event and run the
project, but the break point never is hit. The code should display a grid,
and it shows up in the Design mode, but does not show up when I run. I
checked the page directive to ensure it was set up with the instruction to
indicate that I was using the code behind. When I import is as a single page
and run, it runs just fine. So I must not be setting something correctly to
cause it to go to the code behind form. What should I be looking for to find
out why the page load is not running when I run the application?

Here is my @Page directive..
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="GridInAction2.aspx.vb" Inherits="GridInAction.GridInAction2"%>
Nov 17 '05 #1
1 2414
Since you're using AutoEventWireup="false", Page_Load won't be automatically
connected up as an event handler for the OnLoad event. Your either need to
do 1) AutoEventWireup="true", or 2) override OnLoad instead of using
Page_Load, or 3) override OnInit and do this.Load += new
EventHandler(Page_Load);. Personally I almost always choose option 2.
Visual Studio .NET does option 3 for you.
"Jim Heavey" <Ji*******@hotmail.com> wrote in message
news:en**************@TK2MSFTNGP12.phx.gbl...
Hello, I am walking through the ASP.Net book by Dino Esposito. I created a new project and used the "add existing" option to add the files to my new
project. He had all of the code on a single page and I split into the form and codebehind. I place a "break point" on the page load event and run the project, but the break point never is hit. The code should display a grid, and it shows up in the Design mode, but does not show up when I run. I
checked the page directive to ensure it was set up with the instruction to
indicate that I was using the code behind. When I import is as a single page and run, it runs just fine. So I must not be setting something correctly to cause it to go to the code behind form. What should I be looking for to find out why the page load is not running when I run the application?

Here is my @Page directive..
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="GridInAction2.aspx.vb" Inherits="GridInAction.GridInAction2"%>

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Dave | last post by:
Can I determine if an array of image links is already in memory without using cookies or a hidden frameset? Scenario: visitor starts with Home page, images (links) for navigation pre-load no...
1
by: WFB | last post by:
Hi, I have a base class from which all of my pages derive (ABCBasePage). For example, ABCCustomerSelect Inherits ABCPasePage. I would now like to have ABCPocketSelect which should inherit from...
2
by: Sam | last post by:
I have a custom control (MyTextBox - taken from Microsoft website) that implements the IPostBackDataHandler interface. It is added to the controls collection of a placeholder control during the...
2
by: John Lau | last post by:
Hi, Is there documentation that talks about the page lifecycle, the lifecycle of controls on the page, and the rendering of inline code, in a single document? Thanks, John
2
by: Nathan Truhan | last post by:
Hello I am currently in the process of creating a web page to display and edit reporting data. It consists of a few label with instructions, a Drop-Down-List and Button (Load) to select a report...
7
by: UJ | last post by:
I've got a page with a user control on it. While the page is loading, it needs to check certain conditions of the user object to enable/disable things on the screen. Currently in the page_load of...
4
by: Garry Jones | last post by:
I have recently constructed a website using a lot of php script (self taught). I now wonder if I should have construted the site in a different way. The page contains a header (a.php) and left...
11
by: frizzle | last post by:
Hi there, I need a function to prevent a page from being loaded too often too fast. So say, one is only allowed to refresh a single page 5 times in 10 seconds, or 10 times in 5 seconds (or...
8
by: sneddo | last post by:
Ok I am trying to do the above, I have got a script that will restrict the length but it requires the user to enter the field and hit a key, before it will work. This would normaly be find, but...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.