asp.net session 4
DESCRIPTION
TRANSCRIPT
![Page 1: ASP.NET Session 4](https://reader036.vdocuments.net/reader036/viewer/2022062303/5542095455034694318b45d0/html5/thumbnails/1.jpg)
Basic Programming Overview
Session 4
![Page 2: ASP.NET Session 4](https://reader036.vdocuments.net/reader036/viewer/2022062303/5542095455034694318b45d0/html5/thumbnails/2.jpg)
Objective
• NameSpace
• Several Tools.
• Solution Explorer, Property Window & Toolbox
• Windows Form
![Page 3: ASP.NET Session 4](https://reader036.vdocuments.net/reader036/viewer/2022062303/5542095455034694318b45d0/html5/thumbnails/3.jpg)
Namespace
• A Namespace in Microsoft .NET is like containers of objects.
• Main goal of using namespace in .NET is for creating a hierarchical organization of program.
• In this case a developer does not need to worry about the naming conflicts of classes, functions, variables etc., inside a project.
• The advantage is that every namespace can contain any number of classes, functions, variables and also namespaces etc., whose names are unique only inside the namespace.
![Page 4: ASP.NET Session 4](https://reader036.vdocuments.net/reader036/viewer/2022062303/5542095455034694318b45d0/html5/thumbnails/4.jpg)
Namespace(Example) // Namespace Declaration
using System;
// User created Namespacenamespace hello { // Program start class class space { // Main begins program execution. public static void Main() { // Write to console Console.WriteLine("This is the example of creating own Namespace."); } }}
![Page 5: ASP.NET Session 4](https://reader036.vdocuments.net/reader036/viewer/2022062303/5542095455034694318b45d0/html5/thumbnails/5.jpg)
Other Tools
There are numerous tools available in Visual studio IDE. We will use the following..
• Properties Editor
• Solution Explorer
• Toolbox
![Page 6: ASP.NET Session 4](https://reader036.vdocuments.net/reader036/viewer/2022062303/5542095455034694318b45d0/html5/thumbnails/6.jpg)
Properties Editor
• The Properties Editor tool is used to edit properties in a GUI pane inside Visual Studio.
• It lists all available properties (both read-only and those which can be set) for all objects including forms, web pages and other items.
![Page 7: ASP.NET Session 4](https://reader036.vdocuments.net/reader036/viewer/2022062303/5542095455034694318b45d0/html5/thumbnails/7.jpg)
![Page 8: ASP.NET Session 4](https://reader036.vdocuments.net/reader036/viewer/2022062303/5542095455034694318b45d0/html5/thumbnails/8.jpg)
Solution Explorer
• In Visual Studio , a solution is a set of code files and other resources that are used to build an application. The files in a solution are arranged hierarchically, which might or might not reflect the organization in the file system.
• The Solution Explorer is used to manage and browse the files in a solution.
![Page 9: ASP.NET Session 4](https://reader036.vdocuments.net/reader036/viewer/2022062303/5542095455034694318b45d0/html5/thumbnails/9.jpg)
![Page 10: ASP.NET Session 4](https://reader036.vdocuments.net/reader036/viewer/2022062303/5542095455034694318b45d0/html5/thumbnails/10.jpg)
Toolbox
• Visual Studio provides a Toolbox which can be used to add numerous controls to a Windows Form or a Web Form.
• On the Design pane we can add those controls by selecting and dragging the desired control.
![Page 11: ASP.NET Session 4](https://reader036.vdocuments.net/reader036/viewer/2022062303/5542095455034694318b45d0/html5/thumbnails/11.jpg)
![Page 12: ASP.NET Session 4](https://reader036.vdocuments.net/reader036/viewer/2022062303/5542095455034694318b45d0/html5/thumbnails/12.jpg)
Creating a Windows Form Application
• To create a Windows Form Application we have to click on File-New-Project or simply Ctrl+Shift+N from the keyboard.
• The ‘New Project’ window will appear.
• On the ‘New Project’ window we have to select the ‘Windows Form Application’ and click ‘Ok’.
![Page 13: ASP.NET Session 4](https://reader036.vdocuments.net/reader036/viewer/2022062303/5542095455034694318b45d0/html5/thumbnails/13.jpg)
![Page 14: ASP.NET Session 4](https://reader036.vdocuments.net/reader036/viewer/2022062303/5542095455034694318b45d0/html5/thumbnails/14.jpg)
• A new design window will open. It will be look like this…
![Page 15: ASP.NET Session 4](https://reader036.vdocuments.net/reader036/viewer/2022062303/5542095455034694318b45d0/html5/thumbnails/15.jpg)
![Page 16: ASP.NET Session 4](https://reader036.vdocuments.net/reader036/viewer/2022062303/5542095455034694318b45d0/html5/thumbnails/16.jpg)
• On the design window we can add any Controls from the toolbox.
• Here I have taken the Button and the TextBox Control.
![Page 17: ASP.NET Session 4](https://reader036.vdocuments.net/reader036/viewer/2022062303/5542095455034694318b45d0/html5/thumbnails/17.jpg)
![Page 18: ASP.NET Session 4](https://reader036.vdocuments.net/reader036/viewer/2022062303/5542095455034694318b45d0/html5/thumbnails/18.jpg)
• After that we have to write code for the Windows Form application.
![Page 19: ASP.NET Session 4](https://reader036.vdocuments.net/reader036/viewer/2022062303/5542095455034694318b45d0/html5/thumbnails/19.jpg)
![Page 20: ASP.NET Session 4](https://reader036.vdocuments.net/reader036/viewer/2022062303/5542095455034694318b45d0/html5/thumbnails/20.jpg)
Debugging the Windows Form Application
![Page 21: ASP.NET Session 4](https://reader036.vdocuments.net/reader036/viewer/2022062303/5542095455034694318b45d0/html5/thumbnails/21.jpg)
Summery
• Several Tools.
• Namespace.
• Hands on knowledge on Visual Studio IDE.
• Creating Windows Form Application.