0% found this document useful (0 votes)
129 views5 pages

Data Grid:: Difference Between Repeater Over Datalist and Datagrid: Datagrid

This document discusses different types of caching in ASP.NET applications. It describes output caching, which caches the dynamic output generated by a request. Fragment caching caches a portion of the page generated by the request. Data caching caches objects programmatically using cache objects.

Uploaded by

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

Data Grid:: Difference Between Repeater Over Datalist and Datagrid: Datagrid

This document discusses different types of caching in ASP.NET applications. It describes output caching, which caches the dynamic output generated by a request. Fragment caching caches a portion of the page generated by the request. Data caching caches objects programmatically using cache objects.

Uploaded by

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

Data Grid:

<asp:DataGrid ID="dgAgentRebuttalResponseRec" BorderColor="#D6D1AC" BorderWidt="1p!"


AutoGenerateColu"ns="#alse" runat="ser$er" Widt="1%%&"'
<Colu"ns'
<asp:BoundColu"n Data#ield="()*+" ,eader-e!t="(.*o"'
<,eader(t/le BorderColor="#D6D1AC" BorderWidt="1p!" Widt="0&" 1'
<Ite"(t/le BorderColor="#D6D1AC" BorderWidt="1p!" Widt="0&" 1'
<1asp:BoundColu"n'
<asp:BoundColu"n Data#ield="iA2DI-D3#3C-ID" ,eader-e!t="" 4isible="5alse" 1'
<asp:-e"plateColu"n ,eader-e!t="Accept"'
<Ite"-e"plate'
<center'
<asp:Cec6Bo! ID="C6Response" runat="ser$er" Auto7ostBac6="5alse" 1'
<1center'
<1Ite"-e"plate'
<,eader(t/le BorderColor="#D6D1AC" BorderWidt="1p!" Widt="1%&" 1'
<Ite"(t/le BorderColor="#D6D1AC" BorderWidt="1p!" Widt="1%&" 1'
<1asp:-e"plateColu"n'
<1Colu"ns' <,eader(t/le CssClass="searc8tab8tit" BorderColor="7aleGoldenrod"
Border(t/le="Ridge" 1'
<Ite"(t/le Bac6Color="##A#93#" BorderColor="#D6D1AC" Border(t/le="Dased"
BorderWidt="1p!" 1'
<1asp:DataGrid'
difference between repeater over datalist and datagrid:
DataGrid:
-e DataGrid Web control pro$ides te greatest 5eature set o5 te tree data Web controls: ;it its abilit/ to allo;
te end<user to sort: page: and edit its data. -e DataGrid is also te si"plest data Web control to get started
;it: as using it re=uires noting "ore tan adding a DataGrid to te Web page and ;riting a 5e; lines o5 code.
-e ease o5 use and i"pressi$e 5eatures co"es at a cost: toug: na"el/ tat o5 per5or"ance: te DataGrid is te
least e55icient o5 te tree data Web controls: especiall/ ;en placed ;itin a Web 5or".
-ere are 5i$e built<in DataGrid colu"n t/pes:
BoundColu"n
ButtonColu"n
3ditColu"n
,/per)in6Colu"n
-e"plateColu"n
Repeater:
#inall/: te Repeater control allo;s 5or co"plete and total control o5 te rendered ,->) "ar6up. Wit te Repeater:
te onl/ ,->) e"itted are te $alues o5 te databinding state"ents in te te"plates along ;it te ,->) "ar6up
speci5ied in te te"plates?no "e!tra" ,->) is e"itted: as ;it te DataGrid and Data)ist. B/ re=uiring te
de$eloper to speci5/ te co"plete generated ,->) "ar6up: te Repeater o5ten re=uires te longest de$elop"ent
ti"e. #urter"ore: te Repeater does not o55er built<in editing: sorting: or paging support. ,o;e$er: te Repeater
does boast te best per5or"ance o5 te tree data Web controls. Its per5or"ance is co"parable to te Data)ist@s:
but noticeabl/ better tan te DataGrid@s.
-e Repeater contains te 5ollo;ing 5i$e te"plates:
AlternatingIte"-e"plate
#ooter-e"plate
,eader-e"plate
Ite"-e"plate
(eparator-e"plate
DataList:
Wit its te"plates: te Data)ist pro$ides "ore control o$er te loo6 and 5eel o5 te displa/ed data tan te
DataGrid. 2sing te"plates: o;e$er: t/picall/ re=uires "ore de$elop"ent ti"e tan using te DataGrid@s colu"n
t/pes. -e Data)ist also supports inline editing o5 data: but re=uires a bit "ore ;or6 to i"ple"ent tan te
DataGrid. 2n5ortunatel/: pro$iding paging and sorting support in te Data)ist is not a tri$ial e!ercise. >a6ing up 5or
tese lac6ing built<in 5eatures: te Data)ist o55ers better per5or"ance o$er te DataGrid.
Along ;it te Ite"-e"plate te DataList supports six oter te"plates 5or a total o5 se$en:
AlternatingIte"-e"plate
3ditIte"-e"plate
#ooter-e"plate
,eader-e"plate
Ite"-e"plate
(electedIte"-e"plate
(eparator-e"plate
Is it necessary to lock application state before accessing it?
+nl/ i5 /ou@re per5or"ing a "ultistep update and ;ant te update to be treated as an ato"ic operation. ,ere@s an
e!a"ple:
Application.)oc6 ABC
ApplicationD"Ite"s(old"E = AintB ApplicationD"Ite"s(old"E F 1C
ApplicationD"Ite"s)e5t"E = AintB ApplicationD"Ite"s)e5t"E < 1C
Application.2n)oc6 ABC
B/ loc6ing application state be5ore updating it and unloc6ing it a5ter;ards: /ou ensure tat anoter re=uest being
processed on anoter tread doesn@t read application state at e!actl/ te ;rong ti"e and see an inconsistent $ie;
o5 it. I5 I update session state: sould I loc6 it: tooG Are concurrent accesses b/ "ultiple re=uests e!ecuting on
"ultiple treads a concern ;it session stateG
Concurrent accesses aren@t an issue ;it session state: 5or t;o reasons. +ne: it@s unli6el/ tat t;o re=uests 5ro"
te sa"e user ;ill o$erlap. -;o: i5 te/ do o$erlap: A(7.*3- loc6s do;n session state during re=uest processing so
tat t;o treads can@t touc it at once. (ession state is loc6ed do;n ;en te ,ttpApplication instance tat@s
processing te re=uest 5ires an Ac=uireRe=uest(tate e$ent and unloc6ed ;en it 5ires a ReleaseRe=uest(tate
e$ent.
What are different types of directives in !"#?
H7age: De5ines page<speci5ic attributes used b/ te A(7.*3- page parser and co"piler. Can be
included onl/ in .asp! 5iles <&H 7age AspCo"pat="-R23" language="C#" &'
HControl:De5ines control<speci5ic attributes used b/ te A(7.*3- page parser and co"piler. Can be
included onl/ in .asc! 5iles. <&H Control )anguage="4B" 3nable4ie;(tate="5alse" &'
HI"port: 3!plicitl/ i"ports a na"espace into a page or user control. -e I"port directi$e cannot a$e
"ore tan one na"espace attribute. -o i"port "ultiple na"espaces: use "ultiple HI"port directi$es.
<& H I"port *a"espace="(/ste".;eb" &'
HI"ple"ents: Indicates tat te current page or user control i"ple"ents te speci5ied .*3-
5ra"e;or6 inter5ace.<&H I"ple"ents Inter5ace="(/ste".Web.2I.I7ostBac63$ent,andler" &'
HRegister: Associates aliases ;it na"espaces and class na"es 5or concise notation in custo" ser$er
control s/nta!.<&H Register -agpre5i!="Ac"e" -agna"e="AdRotator" (rc="AdRotator.asc!" &'
HAsse"bl/: )in6s an asse"bl/ to te current page during co"pilation: "a6ing all te asse"bl/@s
classes and inter5aces a$ailable 5or use on te page. <&H Asse"bl/ *a"e=">/Asse"bl/" &'<&H
Asse"bl/ (rc=">/(ource.$b" &'
H+utputCace: Declarati$el/ controls te output cacing policies o5 an A(7.*3- page or a user control
contained in a page<&H +utputCace Duration="#o5seconds" )ocation="An/ I Client I Do;nstrea" I
(er$er I *one" (ared="-rue I #alse" 4ar/B/Control="controlna"e" 4ar/B/Custo"="bro;ser I
custo"string" 4ar/B/,eader="eaders" 4ar/B/7ara"="para"eterna"e" &'
HRe5erence: Declarati$el/ indicates tat anoter user control or page source 5ile sould be
d/na"icall/ co"piled and lin6ed against te page in ;ic tis directi$e is declared.
$an a user browsing %y Web site read %y Webconfig or Globalasax files?
*o. -e section o5 >acine.con5ig: ;ic olds te "aster con5iguration settings 5or A(7.*3-: contains
entries tat "ap A(AJ 5iles: C+*#IG 5iles: and selected oter 5ile t/pes to an ,--7 andler na"ed
,ttp#orbidden,andler: ;ic 5ails atte"pts to retrie$e te associated 5ile. Kou can "odi5/ it b/ editing
>acine.con5ig or including an section in a local Web.con5ig 5ile.
&ow do I debug an '()!"# application that was not written with *isual (tudio!"# and that does not
use code+behind?
(tart te DbgClr debugger tat co"es ;it te .*3- #ra"e;or6 (DL: open te 5ile containing te code
/ou ;ant to debug: and set /our brea6points. (tart te A(7.*3- application. Go bac6 to DbgClr: coose
Debug 7rocesses 5ro" te -ools "enu: and select aspnet8;p.e!e 5ro" te list o5 processes. AI5
aspnet8;p.e!e doesn@t appear in te list:cec6 te "(o; s/ste" processes" bo!.B Clic6 te Attac
button to attac to aspnet8;p.e!e and begin debugging.
Be sure to enable debugging in te A(7J 5ile be5ore debugging it ;it DbgClr. Kou can enable tell
A(7.*3- to build debug e!ecutables b/ placing a
<&H 7age Debug="true" &' state"ent at te top o5 an A(7J 5ile or a state"ent in a Web.con5ig 5ile.
What is the difference between )ageRegister$lient(cript,lock and )ageRegister(tartup(cript?
RegisterClient(criptBloc6 is 5or returning bloc6s o5 client<side script containing 5unctions.
Register(tartup(cript is 5or returning bloc6s o5 client<script not pac6aged in 5unctions<in oter ;ords:
code tat@s to e!ecute ;en te page is loaded. -e latter positions script bloc6s near te end o5 te
docu"ent so ele"ents on te page tat te script interacts are loaded be5ore te script runs.<&H
Re5erence Control=">/Control.asc!" &'
Where does the Web page belong in the !"# -ra%ework class hierarchy?
(/ste".Web.2I.7age
What is a bubbled event?
Wen /ou a$e a co"ple! control: li6eDataGrid: ;riting an e$ent processing routine 5or eac obMect
Acell: button:ro;: etc.B is =uite tedious. -e controls can bubble up teir e$entandlers: allo;ing te
"ain DataGrid e$ent andler to ta6e care o5 its constituents.
(uppose /ou ;ant a certain A(7.*3- 5unction e!ecuted on >ouse+$er o$er a certain button.
What are the different types of caching?
Cacing is a tecni=ue ;idel/ used in co"puting to increase per5or"ance b/ 6eeping 5re=uentl/
accessed or e!pensi$e data in "e"or/. In conte!t o5 ;eb application: cacing is used to retain te
pages or data across ,--7 re=uests and reuse te" ;itout te e!pense o5 recreating te".A(7.*3-
as N 6inds o5 cacing strategies+utput Cacing#rag"ent CacingData
Cacing+utput Cacing: Caces te d/na"ic output generated b/ a re=uest. (o"e ti"es it is use5ul to
cace te output o5 a ;ebsite e$en 5or a "inute: ;ic ;ill result in a better per5or"ance. #or cacing
te ;ole page te page sould a$e +utputCace directi$e.<&H +utputCace Duration="6%"
4ar/B/7ara"="state" &'
#rag"ent Cacing: Caces te portion o5 te page generated b/ te re=uest. (o"e ti"es it is not
practical to cace te entire page: in suc cases ;e can cace a portion o5 page<&H +utputCace
Duration="1O%" 4ar/B/7ara"="Categor/IDC(electedID"&'
Data Cacing: Caces te obMects progra""aticall/. #or data cacing asp.net pro$ides a cace obMect
5or eg: caceD"(tates"E = ds(tatesC
Web Services:
Web (er$ices can be accessed b/ an application ;ritten in an/ language and running on an/
operating s/ste".
A Web (er$ice is progra""able application logic accessible $ia standard Web protocols.
+ne o5 tese Web protocols is te (i"ple +bMect Access 7rotocol A(+A7B. (.') is a WNC
sub"itted note Aas o5 >a/ O%%%B tat uses standards based tecnologies A/0L for data
description and &##) for transportB to encode and trans"it application data.
(.') calls are re%ote function calls that invoke %ethod executions on Web (ervice
co%ponents at Location , #he output is rendered as /0L and passed back to the user at
Location '
W(DL Describes Web (ervices
W(D) stands 5or Web (er$ices Description )anguage.
W(D) is a docu"ent ;ritten in J>). -e docu"ent describes a Web service. It specifies te location
o5 te ser$ice and te operations 1or %ethods2 the service exposes.

You might also like