Book Image

ASP.NET 3.5 CMS Development

Book Image

ASP.NET 3.5 CMS Development

Overview of this book

ASP.NET 3.5 is equipped with a built-in security system, standard design templates, and easy configurations for database connections, which make it the ideal language for building a content management system. With the strong community support for the ASP.NET platform, you can be assured that what you write today will be around and supported for years to come. You can imagine how easy it is to get lost in the myriad features especially if you are a newcomer. This book shows you how to make use of ASP.NET's features and create a functional Content Management System quickly and conveniently. You will learn how to build your site and see the different ways in which you can customize your code to fit your needs. With this book in hand, you can easily set up users and groups, create valuable content for your users, and manage the layout of your site efficiently. All you need is a basic understanding of coding and a desire to learn, and this book will take care of the rest. This book will teach you to get your site up and running quickly, and maintain its content even if you have little or no web design or programming experience. It will give you all the knowledge you need to use the tools as well as the code required to make yourself a strong developer far beyond your site. It begins with setting up your programming environment and coding a Content Management System. You will learn how to install and configure a database and connect it to your CMS. You will be able to create content and manage the layout of your site, and also make it available beyond the browser. At the end of this book, you will have designed and built a CMS that allows you to administer an Articles section, Images and Files sections, as well as a full set of Administrator tools for your site.
Table of Contents (14 chapters)
ASP.NET 3.5 Content Management System Development
Credits
About the Authors
About the Reviewer
Preface

Base pages


The concept of inheritance is one that is at the root of all object-oriented programming. All the pages in our site are currently "inheriting" from the System.Web.UI.Page class that is part of the ASP.NET framework—but they don't have to. One concept that you will find in many applications is the use of a "base" class. The idea behind this is that if you have all of your classes (or pages in our case) inheriting from a single class of your own, then you have given yourself a shared place for many things to reside. Just like in the idea behind the Master Page, we can do this ourselves. Create a new class in your app_code folder, calling it SimpleCMSBasePage.vb. It will start off simple and empty like this:

Imports Microsoft.VisualBasic
Public Class SimpleCMSBasePage
End Class

What you can do now is set it up so that it inherits from System.Web.UI.Page. (You'll come to know the reason in a while.) To do this, change the Class definitions to look like this:

Imports Microsoft.VisualBasic...