|
User Controls Simple Example by Charles Carroll
This page demonstrates how to use a
User Control to re-use some code.
Simple page:
filename=/experiments/usercontrolbasics/reusebasics.aspx
<%@ Register TagPrefix="LearnAsp" TagName="Header" Src="header.ascx" %>
<%@ Register TagPrefix="LearnAsp" TagName="Footer" Src="footer.ascx" %>
<html><head>
<title>Sample of Re-Using Code</title>
</head>
<body bgcolor="#FFFFFF">
<LearnAsp:Header runat="server"/>
Test Document
<LearnAsp:Footer runat="server"/>
</body></html>
The Header User Control:
filename=/experiments/usercontrolbasics/header.ascx
This is my header<hr>
The Footer User Control:
filename=/experiments/usercontrolbasics/footer.ascx
<hr>This is my footer
 |  |  |
 |
There are many worthy charities!!. But perhaps help starving children in Africa or South America AND help Charles too.
a $5 tip buys him lunch at McDonalds,
a $20 tip buys his kid Hitoshi a new computer game,
a $39 tip buys his daughter Michiko a few nice outfits.
See our donor list.
|  |
 |  |  |
|
|
|
|