- VB.NET is an object-oriented programming language that is implemented on the .NET framework. It evolved from Visual Basic 6 but is not backwards compatible.
- The .NET framework is a software development platform created by Microsoft to build applications that run on the Windows platform. It was first released in 2002.
- The .NET framework can be used to create both web-based and desktop applications and supports languages like C# and VB.NET. It includes class libraries for common functions.
2. .NET (VB.NET) is an object-oriented computer
programming language implemented on the .NET
Framework.
Although it is an evolution of classic Visual Basic
language, it is not backwards-compatible with VB6,
and any code written in the old version does not
compile under VB.NET. VB.NET is implemented by
Microsoft's .NET framework.
3. The .NET framework is a software development platform
developed by Microsoft.
The framework was meant to create applications, which
would run on the Windows Platform.
The first version of the .NET framework was released in
the year 2002. The version was called .NET framework
1.0.
4. The .NET framework can be used to create both - Form-
based and Web-based applications. Web services can
also be developed using the .NET framework.
The framework also supports various programming
languages such as Visual Basic and C#.
So developers can choose and select the language to
develop the required application.
7. The "Common Language Infrastructure" or CLI is a
platform on which the .Net programs are executed.
The CLI has the following key features:
Exception Handling - Exceptions are errors which occur
when the application is executed.
8. The .NET Framework includes a set of standard class
libraries. A class library is a collection of methods and
functions that can be used for the core purpose.
For example, there is a class library with methods to
handle all file-level operations. So there is a method
which can be used to read the text from a file.
Similarly, there is a method to write text to a file.
Most of the methods are split into either the System.
Or Microsoft. Namespaces. (The asterisk just means
a reference to all of the methods that fall under the
System or Microsoft namespace)
9. The types of applications that can be built in the .Net framework is
classified broadly into the following categories.
Win Forms – This is used for developing Forms-based applications,
which would run on an end user machine. Notepad is an example of
a client-based application.
ASP. Net – This is used for developing web-based applications,
which are made to run on any browser such as Internet Explorer,
Chrome or Firefox.
The Web application would be processed on a server, which would
have Internet Information Services Installed.
Internet Information Services or IIS is a Microsoft component which
is used to execute anAsp.Net application.
ADO. Net – This technology is used to develop applications to
interact with Databases such as Oracle or Microsoft SQL Server.
10. The following design principle of the .Net framework is what makes it very
relevant to create .Net based applications.
Interoperability - The .Net framework provides a lot of backward support.
Suppose if you had an application built on an older version of the .Net
framework, say 2.0. And if you tried to run the same application on a
machine which had the higher version of the .Net framework, say 3.5. The
application would still work. This is because with every release, Microsoft
ensures that older framework versions gel well with the latest version.
Portability- Applications built on the .Net framework can be made to work
on any Windows platform. And now in recent times, Microsoft is also
envisioning to make Microsoft products work on other platforms, such as
iOS and Linux.
Security - The .NET Framework has a good security mechanism. The
inbuilt security mechanism helps in both validation and verification of
applications. Every application can explicitly define their security
mechanism. Each security mechanism is used to grant the user access to the
code or to the running program.
11. Memory management - The Common Language runtime does
all the work or memory management. The .Net framework has
all the capability to see those resources, which are not used by a
running program. It would then release those resources
accordingly. This is done via a program called the "Garbage
Collector" which runs as part of the .Net framework.
The garbage collector runs at regular intervals and keeps on
checking which system resources are not utilized, and frees
them accordingly.
Simplified deployment - The .Net framework also have tools,
which can be used to package applications built on the .Net
framework. These packages can then be distributed to client
machines. The packages would then automatically install the
application.
12. Web Forms is a web application framework and one of
several programming models supported by
the Microsoft ASP.NET technology.
Web Forms applications can be written in
any programming language which supports the Common
Language Runtime, such as C#or Visual Basic.
Main building blocks of Web Forms pages are server
controls, which are reusable components responsible for
rendering HTML markup and responding to events
13. A technique called view state is used to persist the state of
server controls between normally stateless HTTP requests.
Web Forms was included in the original .NET
Framework 1.0 release in 2002 (see .NET Framework
version history and ASP.NET version history), as the first
programming model available in ASP.NET.
Unlike newer ASP.NET components, Web Forms is not
supported by ASP.NET Core
14. Web forms are based on ASP.NET (ASP stands for Active
Server Pages). Visual Basic will handle the details of
working with ASP.NET for us, so in the end, it feels much
like you're working with a standard Windows Visual Basic
project.
But the difference is that you're creating a Web page or
pages that can be accessed by any browser on the Internet.
These Web pages are given the extension .aspx, so, for
example, if your program is called Calculate Rates, you
might end up simply directing users to a Web page called
CalculateRates.aspx, which they can open in their
browsers
15. Web form-based application is much like developing a
Windows form based application.
Visual Basic will manage the files on the server
automatically, and you don't have to explicitly upload or
download anything, and that's very cool because we can
make use of all that Visual Basic already offers us, such as
drag-and-drop programming, IntelliSense code prompts,
what-you-see-is-what-you-get (WYSIWYG) visual
interface designing, project management, and so on.
16. There are two varieties of Web form controls—server
controls and client controls. Web server controls run not in
the browser, but back in the server.
That means that when an event occurs, the Web page has
to be sent back to the Web server to handle the event.
However, you can force Web server control events like
Selected Index Changed to be sent back to the server at
the time they occur if you set the control's AutoPostBack
property to True (see "Forcing Event Handling" in the
Immediate Solutions section of this chapter).
17. Control Does this
Label A label control.
Textbox A text box control.
List Box A list box control.
Image A control that simply displays an image.
Checkbox A checkbox control
Button A button control.
Table A control that creates an HTML table.
18. Visual Basic creates some Web server controls especially
for Web forms, but it also supports the standard HTML
controls such as HTML text fields and HTML buttons.
You can turn all standard HTML controls into HTML
server controls, whose events are handled back at the
server.
To do that, you right-click a control and select the "Run
As Server Control" item. When you do, you can handle
such HTML server controls in Visual Basic code in your
program by connecting event handling code to them just
as you would in Windows forms.
19. Control Does this
HtmlForm Creates an HTML form.
HtmlTextArea Creates an HTML text area (two-dimensional text
field)
HtmlAnchor Creates an element for navigation
HtmlButton Creates an HTML button using the element.
HtmlInputImage Creates an HTML button that displays images
HtmlSelect Creates an HTML select control.
HtmlImage Creates an HTML specified. Element.
20. Web form programming differs from Windows form
programming—in saving the current state of the data in
controls. They're reset to their default value each time the page
is sent on a round trip to the server, so making sure that the
data in your variables is stored is up to you. To see how to do
this, see "Saving Program Data across Server Round Trips" in
the Immediate Solutions section of this chapter.
There are two possible places to store the data in a page: in the
page itself—that is, in the client—and in the server. To see how
this works, take a look at "Saving Program Data across Server
Round Trips" in this chapter; I'll also take a look at them in
overview here.
21. Before you create a Web application, you must have the Internet
Information Server (IIS) running on the target server (which also
must have the .NET Framework installed) that will host your
application.
The reason IIS must be running on the target server is that Visual
Basic will create the files you need and host them directly on the
server when you create the Web application (usually in the IIS
directory named wwwroot).
Instead of specifying a local or network disk location in the
Location box, you enter the location you want to use on a Web
server.
I'm using a local server (that is, a server on my computer) named
STEVE that would make the URL for the main Web form in the
application, which is WebForm1, "http://STEVE/Ch14/application
name/WebForm1.aspx".