+ All Categories
Home > Documents > Lesson_05_starting

Lesson_05_starting

Date post: 08-Apr-2018
Category:
Upload: adnan-amin
View: 225 times
Download: 0 times
Share this document with a friend
15
8/7/2019 Lesson_05_starting http://slidepdf.com/reader/full/lesson05starting 1/15 By  Adnan Amin Lecturer  / Software Programmer www.geoamins.com  1 By: Adnan Amin (Lecturer  / Software Progr)  
Transcript
Page 1: Lesson_05_starting

8/7/2019 Lesson_05_starting

http://slidepdf.com/reader/full/lesson05starting 1/15

By  

Adnan Amin 

Lecturer / Software Programmer 

www.geoamins.com  

1 By: Adnan Amin (Lecturer / Software Progr) 

Page 2: Lesson_05_starting

8/7/2019 Lesson_05_starting

http://slidepdf.com/reader/full/lesson05starting 2/15

Starting

 ASP.net

 

Introduction to Visual Studio.net environment.  Creating First  ASP.net application. 

Selecting the file type. 

Selecting the programming language. 

Adding the Label control. 

Running the application. 

 

2 By: Adnan Amin (Lecturer / Software Progr) 

Page 3: Lesson_05_starting

8/7/2019 Lesson_05_starting

http://slidepdf.com/reader/full/lesson05starting 3/15

Starting Visual Studio.net  Method # 1 

Start run  type “devenv.exe”  Press Enter 

 

Method # 2 

Click on start button  locate microsoft visual studio.net and click over it. 

3 By: Adnan Amin (Lecturer / Software Progr) 

Page 4: Lesson_05_starting

8/7/2019 Lesson_05_starting

http://slidepdf.com/reader/full/lesson05starting 4/15

 Integrated Development Environment 

Solution Explorer window 

Properties 

Menus and standard bar 

Recent Projects 

Quickly  Create and Open new 

Projects 

Run the project 

4 By: Adnan Amin (Lecturer / Software Progr) 

Page 5: Lesson_05_starting

8/7/2019 Lesson_05_starting

http://slidepdf.com/reader/full/lesson05starting 5/15

Steps for creating new Web Project 

Step # 1: 

Click on File menu. 

Go to New then Click on Web Site. 

This brings up the New Web Site dialog box, as shown 

on next slide. 

5 By: Adnan Amin (Lecturer / Software Progr) 

Page 6: Lesson_05_starting

8/7/2019 Lesson_05_starting

http://slidepdf.com/reader/full/lesson05starting 6/15

Steps for creating new Web Project  Step # 2: 

This dialog box lists the templates available for creating 

Web sites.  

By  default, the ASP.NET Web Site template is selected. That’s the one you want to use to create a basic Web site. 

6 By: Adnan Amin (Lecturer / Software Progr) 

Page 7: Lesson_05_starting

8/7/2019 Lesson_05_starting

http://slidepdf.com/reader/full/lesson05starting 7/15

3. Choose File System from the Location 

drop‐down menu. 

The Location drop‐down list enables you to choose one of  three types of  Web sites you can create: 

File System:‐

HTTP 

FTP 

7 By: Adnan Amin (Lecturer / Software Progr) 

Page 8: Lesson_05_starting

8/7/2019 Lesson_05_starting

http://slidepdf.com/reader/full/lesson05starting 8/15

3. Choose File System from the Location drop‐

down menu. 

File System: 

This option creates a Web site that’s run by  Visual Web 

Developer’s built‐in Web server, which is called the ASP.NET 

Development Server. 

HTTP:  

This option creates a Web site on an IIS server. The IIS  server can run on your own computer or another server computer 

you have access to. This is the option used most often for professional Web site development. 

FTP:  

This 

option 

creates 

Web 

site 

on 

remote 

IIS 

server 

to 

which 

you don’t have HTTP access. It uses the File Transfer Protocol (FTP) to upload your Web site files to the server. 

 

8 By: Adnan Amin (Lecturer / Software Progr) 

Page 9: Lesson_05_starting

8/7/2019 Lesson_05_starting

http://slidepdf.com/reader/full/lesson05starting 9/15

3. Type the name and location for 

your Web site in the path text box.  By  default, file system Web sites are created in My  Documents\Visual Studio 2005\WebSites.  

 

You’ll have to scroll to the end of  this long path to type the name of  your Web site at the end of  this path.  

You can use the Browse button to bring up a dialog box that enables you to browse to the location where you 

want to create the Web site. 

9 By: Adnan Amin (Lecturer / Software Progr) 

Page 10: Lesson_05_starting

8/7/2019 Lesson_05_starting

http://slidepdf.com/reader/full/lesson05starting 10/15

4. Choose the language you want to use 

from the Language drop‐down menu. 

The choices are Visual Basic, Visual C#, and Visual J#. 

• Visual Web Developer grinds and whirs for a moment as it  

 creates your Web site. • When it’s finished, • Here, the Default.aspx page is opened in Source view. 

5. Click OK. 

10 By: Adnan Amin (Lecturer / Software Progr) 

Page 11: Lesson_05_starting

8/7/2019 Lesson_05_starting

http://slidepdf.com/reader/full/lesson05starting 11/15

 Adding a label control  To display  the “Hello, World!” greeting, we’ll add a label control to the Default.aspx page. Follow these steps: 

1. If  the page is currently displayed  in Source view, click  the Design button at the bottom of  the Designer  window. 

2. Drag a Label  control  from the Toolbox onto the page. 

3. In the Properties window, set the Text property of  the label  to Hello,World!. 

4. Expand  the Font property in the Properties window, and  then set the Size property to X ‐Large. 

11 By: Adnan Amin (Lecturer / Software Progr) 

Page 12: Lesson_05_starting

8/7/2019 Lesson_05_starting

http://slidepdf.com/reader/full/lesson05starting 12/15

Here’s the code that’s automatically  generated 

for the label in the Hello World application. 

<asp:Label  

  ID=”Label1”  

  runat=”server”  

  Font‐Size=”X ‐Large”  

  Text=”Hello, World!”> 

</asp:Label> 

12 By: Adnan Amin (Lecturer / Software Progr) 

Page 13: Lesson_05_starting

8/7/2019 Lesson_05_starting

http://slidepdf.com/reader/full/lesson05starting 13/15

Running the Application 

Here are a few other alternatives: 

 Choose Debug ➪ Start Debugging 

 Press F5 

 Right‐click the Default.aspx page in the Solution 

Explorer window and choose View In Browser. 

13 By: Adnan Amin (Lecturer / Software Progr) 

Page 14: Lesson_05_starting

8/7/2019 Lesson_05_starting

http://slidepdf.com/reader/full/lesson05starting 14/15

ASP.net 

Development 

Server 

When you run web pages in Visual Studio, a small message (notice) will be appeared in the 

notification area (windows tray  bar). 

 

This notification means that web page is running 

under the ASP.net development server. 

 

It can provides greatly  simplifies web development. 

There is no need to have IIS installed on your PC. 

No need to create virtual directories. 

By: Adnan Amin (Lecturer / Software Progr)  14 

Page 15: Lesson_05_starting

8/7/2019 Lesson_05_starting

http://slidepdf.com/reader/full/lesson05starting 15/15

Thanks 

Lectures’ 

Notes 

available 

on: 

www.geoamins.com 

Reference Book 

Professional 

ASP.net 

by  

Wrox 

15 By: Adnan Amin (Lecturer / Software Progr)