C#.Net Programming 2 2
C#.Net Programming 2 2
ACADEMY
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)
Draw neat diagrams in large scale wherever necessary and write proper diagram headings.
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
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.
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.
TASK 2
2.1) Web Form using ASP. Net Web Application
Screenshot Of Codes .aspx.vb code
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
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
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