Introduction
As we know components enable us to reuse application logic across multiple pages
or even say across multiple applications. We can write a method named
GetConnection() once and use this method in all the pages consist in website. By
taking advantage of components, we can make our applications very easier to
maintain, execute, reuse and even extend the use in multiple aspects. But if we
are working on simple website project, there is no reason to take advantage of
components.
In this article series we will discuss how to build simple and advanced
components. I am writing this series in multiple parts. If we are working on
Components then we also have to discuss on its methods, properties,
constructors, inheritance and interfaces.
Basic Component
In this basic component we will create simple welcome application suing
components. Here is the example given below.

Class1.vb File Code
Imports
Microsoft.VisualBasic
Public
Class
Class1
Public
Function Welcome() As
String
Return
"Welcome to MINDCRACKER"
End
Function
End
Class
Default.aspx File Code
<%@
Page Language="VB"
AutoEventWireup="false"
CodeFile="Default.aspx.vb"
Inherits="_Default"
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Comments
Join the conversation! Your thoughts help the community grow.