Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Articles
Using a Custom Base Class for your ASP.NET Page's Code-Behind Classes   13 Apr 2005 00:00 GMT

One of the many benefits of object-oriented programming is that it allows for reuse of logic. For example, classes can be created that contain a base level of functionality. These base classes can then be extended through inheritance to create new classes that encompass the functionality of the base class along with any custom logic needed. The end result is that as a developer, once the base class has been created, you can extend and enhance the functionality of the base class with minimal effort. (For a more in-depth look at inheritance be sure to read Ian Stalling's article, Using Object-Orientation in ASP.NET: Inheritance.)

Since the .NET Framework is built upon the principles of object-oriented programming (OOP), it's no surprise that ASP.NET borrows heavily from the tenets of OOP, one such tenet being inheritance. The base functionality for all ASP.NET pages is spelled out by the Page class in the System.Web.UI namespace. This class defines the essential properties, methods, and events for an ASP.NET page, including such members as:

  • The intrinsic objects - Response, Request, Session, and so on,
  • Common properties - IsPostBack, IsValid, and others,
  • Methods used throughout the page lifecycle, such as SavePageViewState(), ProcessRequest(), RaiseChangedEvents(), and others.

While all ASP.NET pages must be derived from the Page class, they need be directly derived. That is, an ASP.NET page may extend a class that, itself, extends the Page class. In fact, when using the code-behind model for creating ASP.NET pages the actual ASP.NET page is derived from the code-behind class, with the code-behind class being derived from the Page class.

In fact, oftentimes it makes sense to create a base class for a particular ASP.NET Web application that extends the Page class and have all code-behind classes derive from this class, rather than directly from the Page class. This universal base class can contain its own properties, methods, or events that are common to all pages in the particular ASP.NET application, or it can extend the functionality of existing methods or properties. In this article we'll look at how to create and start using a custom base class. Read on to learn more!
Read More >


Source: 4GuysFromRolla
Managed Data Access Inside SQL Server with ADO.NET and SQLCLR   12 Apr 2005 07:00 GMT
Managed code can use ADO.NET when running inside SQL Server 2005 using the new SQLCLR feature. Basic scenarios of in-process data access, SQLCLR constructs, and their interactions, are covered.
Source: MSDN
Access User Control's Variable Inside an ASPX Page   12 Apr 2005 03:27 GMT
Find out how to access the user control's variables inside an ASP.NET Web page.
Source: DevX
Skin Your Web Apps Using MVC   11 Apr 2005 08:00 GMT
The Model-View-Controller architecture, built into ASP.NET, lets you drive a different look to your ASP.NET pages using the same code base.
Source: DevX
Variables and Constants for Visual Basic .NET Beginners   11 Apr 2005 07:00 GMT
In this, the second part of Betsy's exploration of Visual Basic .NET for new programmers, she looks at variables and constants and how you can use them in your programs.
Source: MSDN
Retrieveing Database Schema Information Using The OleDbSchemaGuid Class   11 Apr 2005 00:00 GMT
As well as querying and inserting data into a database, there also may be a need to retrieve information about the database schema. This article will discuss such a task by utilizing the System.Data.OleDb class and the OleDbSchemaGuid Class.
Source: AspAlliance
MSDN TV: Introduction to Indigo   08 Apr 2005 07:00 GMT
Indigo is the managed communication stack that will ship with WinFX. It is the "V.Next" for ASP.NET Web Methods, .NET Remoting, Enterprise Services, System.Messaging, and WSE. Steve Swartz provides a brief conceptual overview of Indigo, walks through some code, and introduces you to his jackalope.
Source: MSDN
Visual Basic Developer: VB-Helper: The Transformers   08 Apr 2005 07:00 GMT
Visual Basic Developer's Rod Stephens shows how to use the transformations provided by Graphics objects to bump Pens and Brushes up a notch.
Source: MSDN
Introduction to the Personal Web Site Starter Kit   08 Apr 2005 07:00 GMT
Learn about the new Personal Web Site Starter Kit, which is an available project type in Visual Studio 2005 and Visual Web Developer 2005 Express Edition.
Source: MSDN
Review: Peter's Date Package 1.1   08 Apr 2005 00:00 GMT
Almost every web form I build seems to require some sort of date data to be entered. Whether it's credit card expiration dates or start and end dates for a report, I run into this all the time, and the built-in ASP.NET Webcontrols for capturing this data are lacking, to put it mildly. Peter Blum (of PeterBlum.com) has a solution to this common problem with his Date Package, which I review here. It's not perfect, but it's definitely recommended.
Source: AspAlliance
1 2 3 4 5 6
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage




©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.