Professional Documents
Culture Documents
BCA7 TH CCTpuran Thapa Magar Dot Net Assignment
BCA7 TH CCTpuran Thapa Magar Dot Net Assignment
BCA7 TH CCTpuran Thapa Magar Dot Net Assignment
Roll no : 17530214
Subject: Dot net programming.
Class: BCA 7th semester
c) OOPs support:
It provides fully object oriented environment. OOPs makes
development and maintenance easier where we can easily manage the
codes if it grows as per project size grows.
Answer: To calculate sum of any two integer number we have to follow the
steps as follows.
SUM
b) High performance:
ASP.net performs in high speed. It have a higher performance
related to page and server control processing, state management,
data access, application configuration and loading, and efficient
coding practices.
c) Security:
Developing a secure application is most important aspect of
software development process. ASP.NET allow us to add
extensibility points and configuration options that enable us to
customize various security behaviors in the application.
d) State management:
It includes several options that helps you preserve data on both a
per-page basis and an application-wide basis.
Answer: Page life cycle is simply a sequence of events that happen between
the request (hitting page) and response (returning data to user). When an asp.net
page runs, the page goes through lifecycle in which it performs a series of
processing steps.
Unload Load
a) Initialization:
At this stage, the controls on the page are assigned uniqueID by
settting the uniqueID property and the themes are applied. For a
new request, postback data is loaded and controls properties are
restored to the view-state.
b) Load:
During this phase, if page request is postback, control properties
are loaded with information.
c) Control events:
In this stage, event handler is called if page request is postback.
After that, validate method of all validator controls are called.
d) Rendering:
This happens just before all the response information is sent to the
user. All the information on the form is saved, and the result is sent
to the user as a complete webpage.
e) Unload:
At this stage, the requested page has been fully rendered and is
ready to terminate. At this stage all properties are unloaded and
cleanup is performed.
3: a) Define textbox, label, checkbox and radio button with 5 properties.
Answer:
i) TextBox:
TextBox control is most usuable web server controls in asp.net. It
is rectangular box which is used to take user to input.
In simple, Textbox is place where user can input some text in
Asp.ne web form.
webform1.aspx
This is textbox
Properties:
ii) Label:
The label control is used to display a text or message to the user on the
form. The label gives indication to the user on what is expected to fill up in
the Textbox.
webform2.aspx
Label
Properties:
iii) CheckBox:
CheckBox control is an asp.net web server control. CheckBox control
visually as square on web forms. The Checkbox control allow user to check
square or uncheck square. CheckBox in asp.net allows the user to make binary
choices.
Properties:
a) Checked: used to set check state of the control either true or false.
b) Visible: to set the visibility of control on form.
c) Backcolor: used to set background color of control.
d) Autopostback: True/False.
webform3.aspx
Checkbox
Label
webform4.aspx
user
administrator Radio Button
Properties:
Properties of RadioButton1
Text=User
AutoPostBack=True
Properties of RadioButton2
Text=Administrator
AutoPostBack=True
3: b) WAP to connect with database (SQL server) using sql data adapter,
display the content of database into data grid view and also facilitate insert
operation.
Answer: To connect with database (SQL) server using sql adapter and
display the content of database into data grid view we have to follow the
different steps. They are as:
webform1.aspx
Grid View
Step 9: Execute
4: a) Explain given terminologies: sql connection, sql data reader, sql data
adapter.
Answer:
i) Sql connection:
A Sql connection object represents a unique session to a SQL Server data
source. With a client/server database system, it is equivalent to a network
connection to the server. Sql connection is used together with Sql Data Adapter
and Sql command to increase performance when connecting to a Microsoft SQL
Server database.
If the Sql connection goes out of scope, it won't be closed. Therefore, you
must explicitly close the connection by calling Close or Dispose. Close and
Dispose are functionally equivalent. If the connection pooling value Pooling is
set to true or yes, the underlying connection is returned back to the connection
pool. On the other hand, if Pooling is set to false or no, the underlying
connection to the server is actually closed.
Example:
using (SqlConnection connection = new SqlConnection
(connectionString))
{
connection.Open();
}
ii) Sql data reader:
SqlDataReader Object provides a connection oriented data access to the
SQL Server data Sources from C# applications. ExecuteReader() in the
SqlCommand Object sends the SQL statements to the SqlConnection Object
and populate a SqlDataReader Object based on the SQL statement or Stored
Procedures.
When the ExecuteReader method in the SqlCommand Object execute , it
will instantiate a SqlClient.SqlDataReader Object. When we started to read
from a DataReader it should always be open and positioned prior to the first
record. The Read() method in the DataReader is used to read the rows from
DataReader and it always moves forward to a new valid row, if any row exist .
Properties:
b) Depth: It is used to get a value that indicates the depth of nesting for the
current row.
c) Field count: It is used to get the number of columns in the current row.
Image
Content place holder
Image
webform1.aspx
State Management
i) Application state:
It is a server side state management technique. The data
stored in application state is common for all users of that
particular Asp.net application and can be accessed anywhere
in the application.
b) Client side state management: The data stored is either in the user's
computer, the address bar of the browser or in hidden field inside the
webpage.
Cookies, Querystring and viewstate are the mechanisms for client
side management.
i) View state:
View state stores any type of data and used for sending and
receiving the information. Sometimes users needs to preserve the
data temporarily after post back, then view state is preferred way of
doing it.
iv) Cookies:
Cookies are small piece of information that server creates on
the browser. Cookies store a value in the user's browser that
browser sends with every page request to the web server.
a) RequiredFieldValidator:
The RequiredFieldValidator control ensures that the required
field is not empty. It is generally tied to a text box to force
input into the text box. It is used for checking that data has to
be entered in a particular control, if data is not set/entered it
displays error message.
Properties:
webform1.aspx
OK
Answer: The steps to make report using Microsoft report viewer in Visual
Studio are given below as:
Data-
Base XML
b) Batch update:
Batch update can provide a huge improvement in performance by
making just one round tips to server for multiple batches updates.
c) Connection details:
We can get more details about a connection by setting Connection's
statistics enabled property to True.
d) Dataset.RemotingFormat property:
When Dataset.RemotingFormat is set to Binary, the Dataset is
serialized in binary format instead of XML tagged format, which
improves performance of serialization and diserialization
operations significantly.
f) DbProvidersFactories Class:
This class is list of available data providers on machine. We can
use this class and its member to find out best suited data provider
for our database when writing a database independent applications.
a) IIS
Internet Information Server (IIS) is one of the most popular web
servers from Microsoft that is used to host and provide internet-based
services to ASP.net and ASP web applications. A web server is responsible
for providing a response to request that come from users. When a requests
come from clients to server IIS takes that request from users and process it
and send response back to users.
With IIS we can make our computer to work as web-server and provides
functionality to develop and deploy ASP.net web applications on the server. We
can also set security for particular website for specific users and computer in
order to protect it from unauthorized access.
b) IDE:
An integrated development environment (IDE), also known as
integrated design environment and integrated debugging environment, is a
type of computer software that assists computer programmers to develop
software.
The Visual Studio IDE consists of several sections, or tools, that the
developer uses while programming.