Hi Dennis,
The ID attribute of the WebForm is the Name of the object.
It occurs to me that if you do not know anything about the WebForm class,
which is the meat and potatoes of the Page class, and very little about the
Page class itself, you need to stop where you are, and familiarize yourself
with these very important classes, and how they fit into the ASP.Net object
model. You will never get off of square 1 unless you do. I'm not trying to
bust your chops, but understanding ASP.Net is like understanding
Trigonometry. You have to understand arithmetic, algebra, and geometry
before you start to study Trigonometry, or you are in for a real rough time.
ASP.Net is a pretty complex animal. It is a technology which works within
the environment of an HTTP Web Server, and that subject alone deserves some
study. It create HTML pages on the client, and understanding HTML is also
essential. I don't know at this point whether or not you are familiar with
HTML, but it should be mentioned. It uses a combination of server-side
Object-Oriented programming, and client-side HTML, XML, CSS, JavaScript, the
whole nine yards of what can be done with HTML. All of these topics you
should be familiar with.
In addition, ASP.Net has its own development model, centered around the base
class System.Web.UI.Control. A Page class is inherited from Control, as is
the WebForm class. In fact, any class in an ASP.Net page that sends HTML to
the client inherits System.Web.UI.Control. So, it is important to understand
how Controls work.
Because HTTP is stateless, ASP.Net incorporates a set of "tricks" that
emulate state between Page requests. You need to understand these as well,
including what ViewState, PostBack, Session, and Application are, at the
very least.
The ASP.net System.Web.UI.Page class is the central object usually, as it
incorporates all of the process involved in composing and rendering the
HTML, as well as process for handling PostBacks and server-side Events. The
Page class hosts the WebForm as well as all other System.Web.UI.Controls in
the Page. The Page class is a special type of class that is called a
"Templated Control." It may contain both programming code and ASP.Net/HTML
markup. In fact, it is compiled at run-time to a class, and the markup
becomes executable code. The markup is a handy mixture of the familiar HTML
markup syntax, and a similar ASP.Net markup syntax which can be used to
create Controls in the Page.
The WebForm is the heart of the PostBack model, and must contain all of the
Controls which require any action on the server. you should be familiar with
how the WebForm Control works as well.
Here is the complete Visual Web Developer Reference:
http://msdn2.microsoft.com/en-us/library/ms178093.aspx
Here is the Reference Section regarding ASP.Net Pages:
http://msdn2.microsoft.com/en-us/library/2z18a5tf.aspx
Here is the .Net SDK ASP.Net Reference:
http://msdn2.microsoft.com/en-us/library/9k6k3k4a.aspx
Here is the .Net SDK System.Web.UI Namespace Reference:
http://msdn2.microsoft.com/en-us/library/system.web.ui.aspx
So, do yourself a *big* favor, and try to get a working grasp of these
mechanisms before you try to go forward.
--
HTH,
Kevin Spencer
Microsoft MVP
Chicken Salad Surgery
Orange you bland I stopped splaying bananas?