0% found this document useful (0 votes)
7 views

C#.Net Programming 2 2

C# programming

Uploaded by

Josna Akter
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

C#.Net Programming 2 2

C# programming

Uploaded by

Josna Akter
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

AL SHABAKA TECHNICAL INSTITUTIONAL

ACADEMY

LEVEL - 5 DIPLOMA IN ENGINEERING

NAME : Mosammat Josna Akter

DEPARTMENT : INFORMATION TECHNOLOGY

UNIT :C#.Net Programming


AL SHABAKA TECHNICAL INSTITUTIONAL ACADEMY

ASSIGNMENT COVER PAGE


Learner Name Mosammat Josna Akter

Programme Title LEVEL 5 DIPLOMA IN ENGINEERING

Department INFORMATION TECHNOLOGY

Unit Code Unit Name C#.NET PROGRAMMING

Assessor Name Mrs.Amrutha V.M

Tasks Covered TASK 1 TASK 2 TASK 3

ISSUED DATE SUBMISSION DATE REISSUED DATE RESUBMISSION DATE


Assignment
Dates

Any piece of student’s work without signed declaration will not be accepted for marking.

LEARNER DECLARATION
1) This assignment is the product of individual work.
2) I am aware of what plagiarism / collusion is and the penalties that I/we would suffer if I am found to have committed
plagiarism / collusion.
3) The work submitted is the product of my original work and where material and ideas have been taken from the
published and unpublished work of others, reference to all original sources has been made in the text and via the
reference, bibliography or notes sections, or by some other means.
4) I adhere to the given time period and understand that any kind of late submission is not acceptable.
LEARNER SIGNATURE FOR RECEIVING THE ASSIGNMENT
(Signature should not exceed the box)

Initial Submission Resubmission

LEARNER SIGNATURE WHILE SUBMITTING THE ASSIGNMENT


(Signature should not exceed the box)
I certify that the evidence submitted for this assignment is my own. I understand that false declaration is a form of
malpractice.

Initial Submission - Submitted on DATE 22/12/2021

Resubmission - Submitted on DATE

INSTRUCTIONS FOR WRITING THE ASSIGNMENTS


Choose the Paper Size as A4 and put margins No limitation in colors
The assignment work should be Printing or Handwritten only in Single Side
Font - Times New Roman Title Font Size - 18 Subtitle Font Size - 16 Content Font size-12 Line Spacing - 1.5

Draw neat diagrams in large scale wherever necessary and write proper diagram headings.

It is essential to reference all sources of information at the end of the assignment.


ASSIGNMENT TITLE

SCENARIO

You have joined as an apprentice in a local software company. Your trainer wants to examine your ability of
understanding in various fields of IT sector. In this regard meticulously follow the tasks given below and submit the
report.

TASK 1

1.1 Analyse the components / structure of ASP.NET


1.2 Evaluate the advantages and disadvantages of using ASP.NET compared with other web
development models
1.3 Analyse the advantages of using validators
TASK 2

2.1 Use styles, themes and master pages to create an attractive and easily navigable web
applications
2.2 Display dynamic data from a relational database by using ADO.NET and data binding
through different languages including C#
2.3 Create a web page that uses clientside navigation, client side browser redirect, cross page
posting and server side transfer that meets this brief.
TASK 1

1.1 CLR (Common Language Runtime)-CLR is accountable for providing common phrase structure,
automated memory monitoring, as well as common information type. The obligation of CLR is creating
native code.
• Exemption Handling-- Exceptions are mistakes which take place when the application is
executed. Instances of exceptions are: If an application attempts to open a data on the regional
machine, however the file is not present. If the application tries to fetch some documents from a
data source, but the connection to the data source is not legitimate.
• Garbage collection is the process of removing unwanted resources when they are no more
required. Instances of garbage collection are. A Documents deal with which is no longer called
for. If the application has actually finished all procedures on a file, then the file deal with may no
longer be called for. The data source link is no more required. If the application has completed all
operations on a data source, then the database link might no longer be needed.
• Collaborating with Different languages. As kept in mind in an earlier section, a designer can
establish an application in a selection of ASP. Net programs languages. Language-- The initial
degree is the programs language itself, one of the most typical ones are VB.Net and also C#.
• Compiler-- There is a compiler which will certainly be separate for every programming language.
So underlying the VB.Net language, there will certainly be a separate VB.Net compiler. In a
similar way, for C#, you will have an additional compiler.
• Language Interpreter-- This is the final layer in ASP.Net which would be used to run a.net
program established in any programming language.
Class Library- The ASP.NET Structure consists of a collection of typical course collections. A class
collection is a collection of techniques as well as functions that can be used for the core function.
For example, there is a course collection with methods to handle all file-level procedures. So, there is a
method which can be made use of to check out the message from a document. Similarly, there is a
technique to create message to a data.A namespace is a rational splitting up of methods.
Verification System: This includes collections, a data source as well as design template web pages for
customer logins. There are also devices for multilayer verification and external verification for social
media web sites and also various other websites that allow users to log in externally.
State Administration is the concept of remembering the state of an application at the present point.
Because HTTP is a stateless protocol, extra coding is necessary to lug a transaction an individual starts
from one web page to the following. ASP.NET has this capacity.
Caching-Pages are stored in a momentary place on a user's computer to improve the performance of an
application by quickly recovering a web page a user demands as well as giving that individual a better
action.

1.2) Advantages and disadvantages of ASP.NET


ADVANTAGES
1. Storage personalization choices-In older management framework storage management were
either refined or cramped. Separating identification details storage space from the safety and
security execution code is not a problem anymore, information storage space is a whole lot much
more streamlined.
2. Speed-The functions of ASP.NET approximately create an atmosphere where web advancement
is an instead fast procedure. The setting and the shows language host several benefits that give
programmers the ability to put down the essentials promptly and also create a website rather fast.
Paired with its open-source nature, ASP.NET enables developers to function faster and also with a
far better earnings margin.
3. Allows constructing a variety of web solutions such as: Web-based applications, Company and
business web sites, social media network sites etc.
4. Reduce of maintenance and scalability. Once understanding basic programs criteria and also
techniques of C#, ASP.NET will certainly be better in usage as any other framework.
5. The.NET framework provides a constant, object-oriented programs atmosphere and promotes
safe implementation of code. Object Oriented programs (OOP) is a programs standard that relies
on the principle of classes as well as objects. It is utilized to structure a software program into
simple, multiple-use items of code plans (normally called classes), which are used to produce
specific instances of objects.
6. Object-Oriented Shows (OOP). One of the very best points about.NET is that it is based on object-
oriented shows (OOP). This is where the software is separated into smaller sized portions, which
then enables programmers to service them one by one.
7. Great Caching System-The simpleness of the caching system of.NET makes it reliable and easy to
find momentarily store data.

DISADVANATGES
1. It doesn't sustain many systems like Java.
2. It does not offer the exact same JavaScript on the server and client-side which could be easy for
coding.
3. Mixes format (HTML) as well as logic (scripting code).ASP files regularly integrate manuscript
code with HTML. This causes ASP manuscripts that are lengthy, illegible, as well as switch
frequently between code and HTML. The interspersion of HTML with ASP code is especially
bothersome for bigger web applications, where web content should be maintained separate from
company logic.
4. Licensing expense. Licensing charges can accumulate. The even more demanding the task, a lot
pricier it can get.

1.3) Validators
A validator is a computer program used to examine the credibility or syntactical correctness of a piece of
code or document. ASP. Net validation controls confirm the user input data to ensure that pointless,
unauthenticated, or inconsistent data do not obtain kept.
Advantages of Validators
1. You wish to verify input on the client side initially since you can give better feedback to the ordinary
individual.
2. You intend to validate on the web server side since you can secure versus the malicious customer.
3. Provides the choice of custom validation to regulate other validations that look after firing the
validation, showing the error message, and so on
4. The primary benefit is that it avoids a web page from being post back to the server till the customer
recognition is carried out successfully
5.For programmer viewpoint serve side is better since it will not fail, it is not depending on browser and
also scripting language.

Example of using validators


(Different types of validators are used to check if the inputs inserted are in the correct format )

TASK 2
2.1) Web Form using ASP. Net Web Application
Screenshot Of Codes .aspx.vb code

Screenshot Of Codes .aspx code


Screenshot of Design View

Video Attached in Google Classroom

2.2 Binding data in ADO.Net with Sql Server


Source code for aspx.cs
Source Code for .aspx
Snip It for Execution

Video Attached in Google Classroom


2.3
1.Client-side navigation
Client-side navigation suggests that, your browser (client) or HTML demand a website by
clicking on HyperLink. Link control is the most convenient means to navigate to another
website. It creates a link to an additional Web page. The Link control provides an HTML
support tag, <a>. The Text residential or commercial property is used for showing the text
in the Link. We can likewise display a picture on this control instead of message. To
present a picture we should set the ImageUrl property.
Sample Code Example
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Welcome.aspx">
< asp: Link ID=" HyperLink1" runat=" server
" NavigateUrl=" ~/ Welcome.aspx" > Goto Invite Web Page When you see the sight
source on browser, you will certainly obtain the provided HTML as
<a id="HyperLink1" href="http://Welcome.aspx">provided below: Goto Invite Web
Page</a>
When a user clicks Link control, internet browser called http://Welcome.aspx websites.
You can also utilize JavaScript for customer side navigating.

2. Cross-page posting.
By default, buttons and also various other controls that trigger a postback on an ASP.NET
Websites send the page back to itself. ASP.Net supplies a function called Cross Page
PostBack that makes it possible for a web kind to post-back to a various internet kind. A
Button control supports PostBackUrl home that is made use of to set a Websites to which
the handling occurs. The Web page class has a residential or commercial property named
PreviousPage that is utilized for referral of previous page
Sample Code Example
Let us take an example in which there are 2 web pages called as Home.aspx as well as
http://Welcome.aspx specifically.
The initial web page has a Switch and also a Textbox control. Set the PostBackUrl
residential or commercial property of Button control as" ~/ http://Welcome.aspx".//
Example code for http://Welcome.aspx. secured void Page_Load( item sender, EventArgs

3.Client-side web browser redirect.

The Page. Response things has redirect technique. The Response. Redirect approach
reroutes a demand to a brand-new URL. It instructs the browser to initiate a request for an
additional website. The redirect is not a Post Back. The Previous Page residential or
commercial property does function when utilizing the Redirect method. Response.
Redirect takes an extra big salami to the server.
Sample Code Example

safeguarded void Button1_Click(object sender, EventArgs e).

Response. Redirect (" TutorialRide.aspx");.

4. Server-side transfer.
The Transfer method transfers all the state info in one ASP.NET Page to a second
ASP.NET Web page. Server. Transfer transforms the page being provided on the web
browser. This takes place all on the server. A redirect is not provided to the internet
browser. The URL of address bar of internet browser is not altered in this process. Server.
Transfer minimize web server demands and also keeps the link the exact same. It stays
clear of the big salami to server.
Sample Code Example
secured void Button1_Click( things sender, EventArgs e).

REFERENCES
1. Microsoft Sql Server
2. Microsoft Visual Studio
3. Mrs.Amrutha’s Notes
4. Stackoverflow.com
5. Knowledge.insourcess.com
6. itproguru.com
7. Kb.supremainc.com
8. www.c-sharpcorner.com
9. www.sqlshack.com
10. Kc.mcafee.com

You might also like