How To Use Visual Studio IDE
How To Use Visual Studio IDE
designed to replace the aging Windows New Project dialog by clicking File,
Clicking on “create new project option” on the right of Fig 2.1 setting the project parameters
the screen. Select asp.net core application and click the next
button
Give the project an appropriate name, select the
location of the project and check the “place the project
and solution in same directory” check box as shown
below in fig 2.2
Fig 2.2: set project name and location folder Ensure click empty and check configure for HTTPS in
case you are creating a secure application. After that,
Next click the “create” button to which directs you to
the next window click “Create” button to create your application. This
may take some few minutes, be patient as the project is
being created
2.5 THE VISUAL STUDIO.NET FEATURES
2.5.1 MENUS
Figure 2.3 shows the environment
The main menu for Visual Studio .NET
with a new project ready to go.
is the same for any .NET language for all
programming languages
▪ The File menu was designed to ▪ Build. The Build menu includes the
support the Solution Explorer with commands needed to compile, build and
handling multiple projects at one execute the program on a web browser program
time.
▪ The Edit menu includes the ▪ The Debug menu is used
standard text editing features, such when stepping through a program
as copy, cut, and paste, but also has that has been stopped with a
some advanced features that you will breakpoint or error condition.
find useful, such as outlining and
commenting/uncommenting source code. ▪ Data. The Data menu is useful when
connecting controls to a database
▪ The View menu allows you to or when using an ADO.NET dataset.
switch between the Source Code ▪ The Format menu is a
and ASP.NET Designer edit windows, user-interface menu that helps to align
and also allows you to bring up and format the position and size
dock-able windows that have been of controls.
closed.
▪ The Toolsmenu includes numerous
▪ The Project menu allows you commands that may be needed during
to add new components and files a development project. Most
to the project, such as a new importantly however, is the last item
in the Tools menu, called Options.
ASP.NET forms, databases, controls e.t.c
Use this command to customize the
user interface and settings of your
projects.
from, therefore you will want to display
▪ The Window menu allows you to
select among the open files loaded only those toolbars that are relevant to
into Visual Studio .NET and the project at hand.
arrange the windows on the
screen.
2.5.3 Code Editor Window
2.5.2 Toolbars
that are used by your application. The Properties window is part of the
This window was called Project Explorer Windows Forms Designer but very useful
for Windows Forms, as well as for This is the properties box when the <asp:Image>
Web Forms (ASP.NET). Properties are the control that has been selected. The main sections are:
key to designing a custom user ❖ Grouping View – This changes the manner in
interface with controls (see Figure 2.6). which the properties can be viewed, either with
each property in a group (all data properties
its used to allow web programmers set properties of together etc) or by alphabetical order.
different objects in your project ❖ Property View – This displays all the properties
that are available to the control that has been
selected. These are all the “Design” time
properties, some will not be visible as they are
“Run Time” properties; i.e. they can only be set
when the web site is running.
❖ Event View – These are the events that may be
associated with the control. All controls have
standard events such as Load, Init, Prerender etc.
The Event View of a control’s property box allows for The output box shows the output from when the web
the creation of specific handlers for the events that the site is complied. There is also an error list box which
control is able to create. shows the errors that are currently on the site, the
warnings and general messages. This can be very
useful when creating the site as errors can be caught
before the site is compiled.
The source tab changes the development window to It should be noted that ASP .NET tags are not valid
display the HTML. The design view allows for controls XHTML and will fail a validation check. To check to see
to be dragged and placed on the screen with the HTML if an ASP .NET page is XHTML valid the page should be
automatically created. The Source View allows for a run through the server and the HTML source used to
the HTML. Therefore, the label control in the code will 2.5.7 Tool box
look like: The Tool Box contains all the “drag and drop” controls
that are available within Visual Studio, these are split
<asp:Label runat=”server” ID=”txtHello” Text=”Hello World></asp:Label>
into different panels, each panel contains a different set
The Label is part of the ASP .NET library of controls and of controls such as “Standard”, contains controls such as
as such, has the prefix of asp:, showing that it is a ASP the label, text box, button, calendar and other
.NET control. commonly used controls. The “Data” panel contains the
controls that are often used to display data such as the
grid view, data list etc. The “Login” panel contains the
controls that are most often used within the menus, tool- bars, and the various windows
authorization and authentication aspects of the web that make Visual Studio .NET a
site. productive and efficient development
2.5.8 Server Explorer tool.
2.6 Summary
This chapter provided an overview of
Visual Studio .NET and covered the
major features of the development
environment, including the program