W
Wayne Wengert
This is my first attempt to use a User Control and I am totally confused.
Basically, I am rewriting a set of ASP pages in ASP.NET (VB). The old ASP
files used Include files for common sub routines like connection, managing
background color on objects with focus, etc.. In looking through my asp.net
books, googling and browsing MS sites I believe that the correct approach is
to use a User Control in place of the Include files? The books all show ascx
files as just containing code - e.g.
<Script runat="Server>
Public PTitile As String = "Sample Title"
</Script>
<html>
<head><title><%PTitle%></title></head>
<body>
Using VSNET2003 I create a new User Control and I get the layout for a form
(e.g. PageLoad etc.).
I want to "include" several subroutines and some common code in numerous
aspx pages. The result I want is that the code that calls the subroutines
included in the user control and the subroutines themselves will be added to
the aspx cage where I "include" that user control.
Any concrete (and simple) examples will be much appreciated.
Wayne
Basically, I am rewriting a set of ASP pages in ASP.NET (VB). The old ASP
files used Include files for common sub routines like connection, managing
background color on objects with focus, etc.. In looking through my asp.net
books, googling and browsing MS sites I believe that the correct approach is
to use a User Control in place of the Include files? The books all show ascx
files as just containing code - e.g.
<Script runat="Server>
Public PTitile As String = "Sample Title"
</Script>
<html>
<head><title><%PTitle%></title></head>
<body>
Using VSNET2003 I create a new User Control and I get the layout for a form
(e.g. PageLoad etc.).
I want to "include" several subroutines and some common code in numerous
aspx pages. The result I want is that the code that calls the subroutines
included in the user control and the subroutines themselves will be added to
the aspx cage where I "include" that user control.
Any concrete (and simple) examples will be much appreciated.
Wayne