Forms
You may (well, should have) taken a look at
that code and said - "Hey, why is the form tag inside the user control" (or
something to that effect). Well, yes, the form is inside the user control and
this will cause problems if you want to have other web server controls on the
page.
However there is the HtmlForm class to
the rescue.
Imports
System.Web.UI.HtmlControls
...
Public webform
As
New
HtmlForm()
...
Controls.Add(LoadControl("samplecontrol.ascx")) |
That should solve all of your problems with
that.
Summary
Well, this article should have been detailed
enough to show you the basics of creating a page template and it should be
obvious how they can benefit your site. If in doubt, check out my other
article, Consistent Website Design, on the
topic.