I am trying to learn subroutines in ASP+ pages.
I was wondering what will be the use of Public , Private
keywords for Sub and Function. as i feel on Web only 1 page is going to
execute, so where i will share Sub and Functions.
Can anyone Explain or direct me to any URL on this.
Jignesh.
The reason for Public Sub/Function in a web page is because everything
in .NET is an object, even ASP.NET pages. In a page it's not a big issue
most of the time, but comes into its own when creating user controls
(small reusable bits of pages), where you can load them dynamically and
they behave like normal objects. You can set their properties or call
their methods (any that are marked Public).
Dave
> I am trying to learn subroutines in ASP+ pages.
> I was wondering what will be the use of Public , Private
> keywords for Sub and Function. as i feel on Web only 1 page is going to
> execute, so where i will share Sub and Functions.
>
> Can anyone Explain or direct me to any URL on this.
>
> Jignesh.
>