<%@ Register Src="MyUserControl2.ascx" TagName="MyUserControl2" TagPrefix="uc1" %>
<%@ Page Language="VB" %>
<script runat="server">
Sub Page_Load(sender As Object, e As EventArgs)
'*** Code ***'
Me.MyUsrCtrl.strText = "Welcome To www.ThaiCreate.Com"
End Sub
</script>
<html>
<head>
<title>ThaiCreate.Com ASP.NET - Web User Control</title>
</head>
<body>
<form id="form1" runat="server">
<uc1:MyUserControl2 id="MyUsrCtrl" runat="server" />
</form>
</body>
</html>
MyUserControl2.ascx
<script Language="VB" runat="server">
Public strText As String
Sub Page_Load(sender As Object, e As EventArgs)
Me.lblText.Text = strText
End Sub
</script>
<table style="width: 495px" border="1">
<tr>
<td style="height: 73px; text-align: center">
<asp:Label ID="lblText" runat="server" Font-Size="X-Large"></asp:Label></td>
</tr>
</table>
Screenshot
ASP.NET & Visual Studio .Net 2003 - Web User Control