0% found this document useful (0 votes)
14 views2 pages

Unit 3

Uploaded by

Shubhasmita Sahu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views2 pages

Unit 3

Uploaded by

Shubhasmita Sahu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

UNIT 3

Q9. Significant of ViewState in ASP.NET


View State
View State is the method to preserve the Value of the Page and Controls
between round trips. It
is a Page-Level State Managementtechnique.
View State is turned on by default and normally serializes the data in every
control on the page
regardless of whether it is actually used during a post-back.
Features of View State
These are the main features of view state:
Retains the value of the Control after post-back without using a session.
Stores the value of Pages and Control Properties defined in the page.
Creates a custom View State Provider that lets you store View State Information
in a SQL
Server Database or in another data store.
Advantages of ViewState
Easy to Implement.
No server resources are required: The View State is contained in a structure
within the page load.
Enhanced security features: It can be encoded and compressed or Unicode
implementation.
Disadvantages of View State
Security Risk: The Information of View State can be seen in the page output
source directly.
We can manually encrypt and decrypt the contents of a Hidden Field, but It
requires extra
coding. If security is a concern, then consider using a Server-Based State
Mechanism so that no
sensitive information is sent to the client.
Performance: Performance is not good if we use a large amount of data because
View State is
stored in the page itself and storing a large value can cause the page to be slow.
Device limitation: Mobile Devices might not have the memory capacity to store
a large
amount of View State data.
It can store values for the same pageonly.
Q17. Explain relation between content page and master page
 Master page provides a framework (common content as well as the layout)
within which the
content from other pages can bedisplayed.
 It provides elements such as headers, footers, style definitions, or navigation
bars that are
common to all pages in your website.
 So the Content Pages need not have to duplicate code for shared elements
within your Web site.
 It gives a consistent look and feel for all pages in your application.
 The master page layout consists of regions where the content from each
content page should be
displayed.
 These regions can be set using ContentPlaceHolder server controls.
 These are the regions where you are going to have dynamic content in your
page

 A derived page also known as a content page is simply a collection of blocks


the runtime will use
to fill the regions in the master.
 To provide content for a ContentPlaceHolder, you use another specialized
control, called Content.
 The ContentPlaceHolder control and the Content control have a one-to-one
relationship.
 For each ContentPlaceHolder in the master page, the content page supplies a
matching Content
control
 ASP.NET links the Content control to the appropriate ContentPlaceHolder by
matching the ID of
the ContentPlaceHolder with the Content ContentPlaceHolderID property of the
corresponding

You might also like