report on asp.net

26
A Seminar Report On “Practical Training” Taken at “ .NET ” And Submitted in the partial fulfillment for award the degree of Bachelor of Technology In Computer Science Engineering From Rajasthan Technical University, Kota Session 2015-2016 Submitted To Submitted by Mr. Jagdish Goswami Shagufta Tabassum HOD Of Computer Science Roll no.1..…………... M.A.C.E.T. Kota Enroll. no. 1..…………….. MAHARISHI ARVIND COLLEGE OF ENGINEERING & TECHNOLOGY, KOTA (RAJ.) Approved by AICTE, Affiliated to Rajasthan Technical University, Kota

Upload: lokesh

Post on 20-Jan-2017

232 views

Category:

Engineering


18 download

TRANSCRIPT

A

Seminar Report

On

“Practical Training”

Taken at

“ .NET ”

And

Submitted in the partial fulfillment for award the degree of

Bachelor of Technology

In

Computer Science Engineering

From

Rajasthan Technical University, Kota

Session 2015-2016

Submitted To Submitted by

Mr. Jagdish Goswami Shagufta Tabassum

HOD Of Computer Science Roll no.1..…………...

M.A.C.E.T. Kota Enroll. no. 1..……………..

MAHARISHI ARVIND COLLEGE OF ENGINEERING & TECHNOLOGY, KOTA (RAJ.)

Approved by AICTE, Affiliated to Rajasthan Technical University, Kota

ACKNOWLEDGEMENT

Many people have contributed to the success of this. Although a single

sentence hardly suffices, I would like to thank Almighty God for blessing

me with grace.

I extend my sincere and heartfelt thanks to Mr. JAGDISH GOSWAMI,

Assistant Professor Computer Engineering Department, for providing me

the right ambience for carrying out this work. I am profoundly indebted

to my seminar guide & I express my immense pleasure and thankfulness

to all the teacher and staff of the Department of Computer Science for

their cooperation and support.

Last but not the least, I thank all others, and especially my class-mates

who in one way or another helped me in the successful completion of this

work.

SHAGUFTA TABASSUM

4th Year , 7

th sem

PREFACE

As we know that an Engineer has to serve an industry, for that

one must be aware of industrial environment, their management

problems and the way of working out their solutions at the industry.

After the completion of the course an Engineer

must have knowledge of interrelation between the theory and the

practical.

For this one must be familiar with the practical

knowledge with theory aspects.

CONTENTS

1. ASP.NET

2. FEATURES OF ASP.NET

3. ASP.NET AS A WEB APPLICATION FRAMEWORK

4. CHARACTERISTICS OF ASP.NET

5. MICROSOFT VISUAL STUDIO

6. STATICS WEBPAGES

7. DYNAMIC WEBPAGES

8. WEB SERVER CONTROLS

9. VALIDATION CONTROL

10. LIST CONTROL

11. STYLES AND STYLE SHEETS

12. Master Pages

13. Conclusion

14. Reference

1. ASP.NET :-

ASP.NET is a platform for developing web based

application. It lets you create sophisticated web application that

can interact with users.

ASP.NET includes PHP, several JAVA based

tools such as JAVA server pages are JAVA servlets.

2. Features Of ASP.NET:-

(i) Windows and its dependence:- Unlike most

alternatives, ASP.NET will only work on Microsoft

Windows based web servers. That means the

operating system must be Microsoft internet

information services, also known as IIS. ASP.NET

specifically requires the following support software.

• Windows 2000 server or windows server 2003

• Internet information services 5.0

• Microsoft.NET Framework 2.0

One practical advantage of ASP.NET is that it work

entirely on Microsoft software. ASP.NET lucks you into using the

Microsoft platform.

(ii) Object orientation:- ASP.NET is inherently object

oriented. If one is familiar with programming and have

worked with object oriental programming language

such as C++ or JAVA. One will appreciate the benefits

immediately.

A major attraction at ASP.NET object orientation is

that it allows you to take advantage of vast library of

predefined classes known as the .NET Framework.

Many .NET framework classes are designed specifically

for working with ASP.NET for example those that

represent controls such as text boxes , radio buttons

and drop-down list.

(iii) Choice of language:- Most web development

platforms tie you to a specific language. For example-

JAVA-based tools such as JAVA server pages tie you to

JAVA Language; other tools, such as Cold fusion, use

their own proprietary languages. But ASP.NET gives

you the choice of two language to use for web pages.

(iv) Visual Base .NET:- Visual .NET is a modern version

of the venerable basic programming language.

• C#- C-sharp is a relatively new language designed by Microsoft

specifically for .NET. its syntax is similar to JAVA, so if you are

an expreieneed JAVA programming learning C#.4

• J#- Microsoft’s version of JAVA.

Visual studio :-

One of the best feature of ASP.NET is visual studio,

the integrated development enviovrment that combines a web page

editor. A debugger and several other development tools into one easy

to use program.

Web Server and Web Browsers :- One crucial point to understand about web

application is that they work by using both client and server software.

• Client is a web browser that runs on the end user’s computer.

In most case the web browser is a Microsoft internet Explorer.

• The server is a software is a software that runs on the server

• computer that host’s web application. For ASP.NET applications

the server computer is always Microsoft internet information

services also known as IIS.

The server computer

• also have Microsoft .NET framework software installed as

ASP.NET is a part of the .NET framework. The server

computer also typically has data base server installed. In some

cases data base may run on a separate computer to improve

the main server machine’s performance.

Two other alphabets constantly develop ASP.NET application-

- HTML (Short for Hypertext makeup Language) is a

standardized set of makeup togs used to format the web

pages displayed by a web browser.

- HTTP (Short for Hypertext Transfer Protocol) is the standard-

ized protocol. That web browser and web server use to

communicate with each other.

• ASP.NET as a web application framework:-

ASP.NET is a web

application framework which is a software framework that is

design to support the developments of dynamic website web

application and web services and is the successor to

Microsoft’s active server page technology.

ASP.NET code is button the common

language runtime allowing programming to wrote ASP.NET

code using any supported .NET language.

Characteristics:- ASP.NET contain many characteristics

which make it a efficient web application framework.

(I) PAGE:- ASP.NET web page or web page known officially

as web forms. Are the main building block for application

development web forms are contained in files with an

“.aspx” extension. These files typically contains Statics

HTML mark up as well as mark up defining server side

web control and user controls where the developer

placed all the required statics and dynamic content for

the web pages. Microsoft introduced a new code behind

model which allows statics text remain on the .aspx page,

which dynamic code remains in an .ASPX.VB or .ASPX.CS

or .ASP.FS file.

(II) CODE BEHIND MODEL:- Microsoft recommands dealing

with dynamics program code by using the code behind

model which place this code in a separate file or in a

specially designated script tag. Code behind files

typically have names like My page .ASPX.CS or My page

.ASP.VB this practice is automatic in Microsoft visual

studio and other IDE.

(III) DIRECTIVES :- A directive is special instruction on how

ASP.NET should process the page. The most comman

directive is <%@page%> which can specify many things

such as which programming language is used for the

server side code.

PERFORMANCE:-

ASP.NET aims for performance benefits over other

script based technology by compiling the server side code to one more

DLL file on the server.

This compilation happend automatically the first time a

page a required.

MICROSOFT Visual Studio:- Microsoft visual studio is an

integrated development enviorement from Microsoft. It is used to

develop console and graphical user interface applications, websites,

web application and web services.

Visual studio includes a code editor supporting

intellisense as well as code refactoring. The integrated debugger works

both as a source level debugger and a machine level debugger.

Visual studio supports different programming language

by means of language services which allows the code editor and

debugger to support nearly any programming language.

Built in language include C/C++, VB.NET, C# etc.

It also supports XML, HTML / XHTML JAVA Script and CSS.

STATICS Web Pages:-

The World Wide Web was originally designed

to display statics pages that is pages that are the same every time they

are displayed.

A typically way to initiate display of a statics web

pages is for a user to enter the web address of the page in a browser’s

bar. Or for a user to click a link that leads to the pages. Either way the

browser sends an HTTP message called an HTTP request to the server

specified by the web address.

This request message includes the name of the

HTML file that define the pages being requested by the user. In

addition, the request message includes the address of the browser

that’s requesting the file.

When The server machine receives the request.

It locates the HTML file on its disk and sends the HTML back to the

browser by way of an HTTP response message.

Then, when the browser receives the response, it

decodes the HTML file and displays the webpages.

DYNAMIC Web Pages:-

Although the World Wide Web was

originally designed for statics web pages. Must web page these day

display dynamic content that is content that changes each time the

page is retrieved. Instead of retrieving HTML data from a file. Dynamics

web pages work by running a program that generates the HTML sent

back to the browser.

But the work goes an at the server is difference instead of

locating HTML file on the disk, the server runs a program to generate

the HTML for the request page and that is what return to the user via

an HTTP response.

WEB Server Controls:- Controls are the building block of ASP.NET

pages. There are some basic web server controls.

1. Label

2. Text Box

3. Button

4. Check Box

5. Radio Button

6. Image

LABEL Controls:-

A label control displays text to identify a fature on

web page.

For Example – The page shows four label controls. The first provides

instruction for the user. The next two identify input the field the user

should enter data into the fourth label displays the result of the

calculation.

<asp: label ID =“label 1”runat= “server”

Text = “enter two numbers to add” 1>

<asp: label ID=“label 2”runat = “server”

Text = “first number :”width = “110px”1>

<asp: label ID= “label3”runat= “server”

Text = “second number:”width= “110px”>

<asp: label ID= “labelresult”runat= “server”

Text “the result is:”1>

The first two propped specified for these

label controls are found in all ASP.NET controls. ID provides a name for

the control.

The run at attribute is also required for all ASP.NET

controls.

Its indicates that the control will run at the server rather than at the

browser.

TEXT BOX Control-

A text box control provides a way for users to

enter text data. The user can use these text box to enter a username

and password.

USING BUTTON Control-

ASP.NET provides three district types of button

controls button,Link button and image button. The three type of button

have the same behavior but they each have a different appearance.

A standard button control looks like a hyperlink

and an image button displays an image file.

CHEAK BOX Control-

A check box is a control that the user can click to

either check or uncheck normally check boxes are used to let the user

specify Yes or No.

RADIO BUTTON Controls-

Radio button are similar to check boxes, but with a

crucial difference. Radio button travel in group and a user can select

only radio button in each group at a time.

IMAGE Control-

An image control is simply a control that displays an

image file; the user click the images to use the control. The two most

common types of image files used. In web application are JPEG and GIF

files. JPEG files are used typically for larger more detailed images, while

GIF files are the standard choice for small icons.

VALIDATION CONTROLS:-

Validation is one of the most important

parts of any types of computer programming. The moment you expose

your program to the outside world by asking a user to input some data.

The possibility arises that the user will enter the wrong data or that the

user will forget to enter any data at all. To get any real work done,

ASP.NET programs need to protect them selves from such error.

There are Six different validation controls are used-

(a) Required field validator:- This is most popular of the validation

controls. Its requires the user to enter to enter some value in a

field. Any enter some thing.

(b) Compare validator:- The validator compares the vale entered by

the user with some predetermined value. One of the most

common uses of this validator is to ensure that the user enters

data of the correct type.

For example- If a text box requires numerical input. You can use a

compare validator to make sure the user enters a valid number.

(c) Range validator:- This validator makes sure that the value entered

by the user falls with in a given range.

(d) Regular Expression validator:- This validator makes sure that

the user enter a value that matches a pattern.

For example One can use this validator for Zipcodes telephone

Numbers etc.

(e) Custom validator:- This validator lets you write your own code to

determine whether the user entered correct input data.

(f) Validation summary:- This control is used along with other

validation controls to displays a summary message that lists all errors

discovered on the page.

LIST CONTROL:-

There are four server controls that works with

list of data. First are the Check Box list and Radio Button list controls,

Which displays lists of check boxes and radio buttons. Finally the list

box control and drop down list control are used. These controls let the

user select an item from a list of options.

CHECK BOX LIST CONTROL:-

The check box list displays a list of check

boxes. It provides a simple way to present a set of options to the user

without requiring one to code each check box individudly.

The check box list control has several properties that let

you control the way list items are formatted.

Property Description

Specifies whether the text appears to the

1. Text Align right or left of the check boxes.

The default is Right

2. Repeat Columns The number of columns to displays. The

Default is 1.

3. Repeat Direction Vertical and horizontal to indicate

whether the check boxes are repeated

vertically or horizontally.

4. Repeat Layout Table or flow table indicate that an

HTML table should be used to control the

Column layout.

5. Call padding When table layout is used, sets the size of

The gap between the contents of a cell

and cell’s border.

6. Cell Spacing When Table layout is used, sets the

Amount of space that appears between the

table cells.

Creating columns:-

The most comman use of the check box list

control properties is to break the list of check boxes into multiple

columns.

The first way specifies vertical for the repeat direction

property and second way specifies horizontal.

Aligning Text With Check Boxes:-

By default, the check boxes in check list

control appears to the left of the text including each text box.

One can change the orientation by including the Text Align property

when one can create the check box list.

Spacing Things out:-

If the items in a check box list control seen

crowed. One can space them out by using the cell padding and cell

spacing properties. These properties work only when one specify table

for repeat layout properties.

Then, the cell padding property lets one add extra space with each cell

of the HTML table that’s used to display the Check Box List, and the cell

spacing property adds extra space between the cells. Together, these

properties lets one add extra space so the items in the list don’t seem

so crowded.

Working with List Item Elements:-

The item displayed by the Check

Box List control and any other type of list control for that matter are

defined by List item elements that appear between the start and end

tags for the Check Box List control.

List item element are the same for all four types of

list controls presented.

USING THE TEXT PROPERTY:- One can supply the Text property for a

list item in the one of two ways: by listing the text value between the

start and end tags for each list item, or by using text attribute.

USING VALUE PROPERTY :- If one don’t provide a value property for

a list item, the value property is given the same value as the text

property.

RADIO BUTTON LIST Control:-

The Radio Button List control is

similar to the Check Box List control, with the exception that it create a

list of Radio Buttons rather than check boxes. However check Box List

control applies to the Radio Button as well as. But there are a few

important variations.

• The Radio Button List has a selected value property one can

use to get the value property of the selected item. This is

• possible because unlike a Check Box List, a Radio Button List

can have only one item selected at a time.

• One can use the selected index property to get the index value

of the selected item. The one can use this index value to access

the select list item based on its position in the list.

LIST BOX CONTROL:-

A List Box control is similar to a Check Box List

or Radio Button List control but it displays simple text lines rather then

check boxes or radio buttons. A list box can be configured to limit the

user to a single selection or it can allow the user to select more than

one item from the list. And unlike a check box list or radio button list a

list box can include scroll bars.

DROP DOWN LIST CONTROL:- A drop down list control combines the

features of a text box with the features of a list box. Unlike a list box,

the list of items in a drop down list doesn’t appear until there user click

the drop down arrow that appears as part of the controls.

Also unlike a list box a drop down list limits the user to a single

selection.

Multiview Control:-

A multi view controls is a controls that contains

one or more views, each of which can display a different set of controls.

Multi view controls are typically used to create page that required a lot

of input from the user. Rather than throw all the input controls at the

user at once, multi view control lets one break the input controls into

section and display only one group of control at a time.

Wizard Control:-

The Wizard control is like the multi view control.

It’s designed to create sequence of the steps, such as the check out

page for an online store or the sign up page for a members only

website.

Like the multi view control, Wizard control is a container

for groups of other controls that are displayed one at a time, instead of

views, these groups of controls are called steps.

Unlike multi views controls the wizard control has

automatic features built in that let the user move from step to step.

Styles and Style Sheets:-

The biggest style buzz right now is

cascading style sheet, especially version 2.0 and higher. One can use

style sheets to store formatting information in one place and have one

set of styles trickle down to all pages on the site and all elements on the

pages.

For Example- One can design a text box style in one place, and the

browser applied that style to every text box that it renders.

CSS Lets one to separate presently from content. Headline

inside an <h2> tag and a paragraph of text with in <p> or <div> tags is

nothing in makeup language because the information about the way

that text looks comes from some where else overall pages are cleaner

and more consistent when one don’t much the words and the styles.

Type = “text”

Value= “keep me inline”/>

One can see that style information, such as the color and

font size, sits right inside the <input> tag. One may find that setup

convenient at the outset, but if you have a page with text boxes, one

can end up repeating the style information. Worse on a big website

with a lot of pages, you have to visit every page and every text box if

you change its mind.

• Embedded:-

In this location, the style sheet inside <style> tag in

the <head> area of the web page. One can translate the

preceding inline to the embedded format like this code:-

<style type= “text less”>

Input {

To gether in the make up.

If one apply its style sheet properly, he can give an entire web

site a mark over by swapping in new design contained in one

CSS file.

Styles can live in three man places in a web site. Each

location has its advantage and disadvantages.

• Inline:- These styles stick closely to the object that they are

styling. Actually, some designers say they are too close and lose

many of the benefits of style sheet. Here is an example of an

inline style:-

<input style= “color:black;

Font family: ‘cooper black; fantasy;

Background-color: light gray;

Font size : xx-large;’

Id- “text 1”

Color : black;

Font family : “copper black; fantasy;

Font size : xx-large;

}

</ style>

The embedded format works fine for individual

pages because all of the text boxes on the pages adopt the

appearance characteristics. However for a large site, it still

means opening each page to change the overall look of the

element.

• External-

This technique puts all of the style information but

no HTML in a separate file or files. Each web page include a link

to that style sheet.

One can make one change and have every page that reference

the style reflect that change external style sheet usually have

the file extension, CSS.

Style sheet 1 .CSS may contain. This content

Input

{

Color : black;

Font family : ‘copper black’,Fantasy;

Background-color : light grey;

Font size : xx-large;

}

‘ inside the HTML page, with in the <head> tag. One include

the link to the style sheet file as the following code shows

< link

Href = “stylesheet.css”

Media = “all”

rel = “stylesheet”

type = “text/css”/>

MASTER PAGES:-

ASP.NET Master pages feature makes it

easy to create pages that have a consistent appearance. A

Master page is simply a template that provides elements that

appear consistently on each page, as well as content place

holders that specify where the variable content for each page

could appear. A page that actually holds the content that a

Master page displays in its content area is called content page.

The default .axpx page generated when

one first create an ASP.NET application doesn’t use master

pages.

1. Delete the default .aspx page immediately after starting a

new website.

2. Create a master page which can be used for project.

3. Use the Add new item command to add a new default

.aspx page to the project, selecting the Master Page for

the page.

When one will add a Master Page to the

project, all remaining pages in the project should be

content pages rather than regular web pages.

CONCLUSION

A technician needs to have not just theoretical but practical as well

and so every student is supposed to undergo practical training session

after 2nd

year where I have imbibed the knowledge about coding,

designing and software with economical issues related to it.

During our 30 days training session we were acquainted with the

.NET coding and designing. As we mentioned during our discussion of

people-oriented software, the future of computing will undoubtedly

involve getting machines to talk to one another over the Internet. The

Internet is a ubiquitous network to which scores of people have access.

Until now, there has not really been a way to use the Internet as a

software platform. However, the technology is now in place to make that

happen, and ASP.NET makes it that much easier to manage Web

programming. ASP.NET keeps all the good features of classic ASP (in

process performance, a well-established syntax, the ability to add

executable blocks to your Web page) and improves on them (e.g., by

providing a more granular HTTP request handling model, providing a

compilation model for Web pages, and organizing the parts of a Web

page into classes and making those classes available through the CLR

type system). ASP.NET will undoubtedly be the tool of choice for most

Web developers for the next five to ten years.

REFERENCE:-

1. "ISO/IEC 23270:2006 - Information technology - Programming languages -

C#".

2. "What's New in Visual Studio 2005". MSDN. Microsoft. Retrieved 1

September 2014.

3. Hands on with ASP.Net MVC - Covering MVC 6 By-Rahul Sahay.