You are on page 1of 25

Quiz # 1 1. The .NET Framework provides a runtime environment called.. ? A. !T ". #$ #. #T %. # Ans&" '. (n A)*.

NET in +orm pa,e the o-.ect which contains the user name is ////// ? A. *a,e.0ser.(dentit1 ". *a,e.0ser.(s(n ole #. *a,e.0ser.Name %. None o+ the A-ove Ans&A 2. 3hich o+ the +ollowin, lan,ua,es can -e used to write server side scriptin, in A)*.NET? a4 #5sharp -4 6" c4 #77 d4 a and Ans& d 8 3hich o+ the +ollowin, denote wa1s to mana,e state in an A)*.Net Application? A. )ession o-.ects ". Application o-.ects #. 6iew)tate %. All the A-ove Ans&% 9. 3hat is the -ase class +rom which all 3e- +orms inherit? A. !aster *a,e ". *a,e #lass #. )ession #lass %. None o+ the A-ove Ans&" :. 3)%$ stands +or ///////////////// ? A. 3e- )erver %escription $an,ua,e ". 3e- )erver %escriptor $an,ua,e #. 3e- )ervices %escription $an,ua,e %. 3e- )ervices %escriptor $an,ua,e Ans&#

;. 3hich o+ the +ollowin, must -e done in order to connect data +rom some data resource to epeater control? A. )et the %ata)ource propert1 ". #all the %ata"ind method #. "oth A and " %. None o+ the A-ove Ans&# <. =ou add a *rint*review%ialo, ppd1 to 1our 3indows Form> in order +or 1our users to preview the document which the1 want to print. 3hich propert1 o+ ppd1 should 1ou set in order to speci+1 the document to preview? a. *review%ocument -. *rint%ocument c. %ocument d. Active%ocument Ans& c ?. 3hich o+ the +ollowin, trans+er e@ecution directl1 to another pa,e? A. )erver.Trans+er ". esponse. edirect #. "oth A4 and "4 %. None o+ the A-ove Ans&A 1A. (+ one has two di++erent we- +orm controls in a application and i+ one wanted to know whether the values in the a-ove two di++erent we- +orm control match what control must -e used? A. %ata$ist ". Brid6iew #. #ompare6alidator %. $istview Ans&# 11. 3hich o+ the +ollowin, is used to send email messa,e +rom m1 A)*.NET pa,e? A. )1stem.3e-.!ail.!ail!essa,e ". )1stem.3e-.!ail.)mtp!ail #. "oth A and " %. None o+ the A-ove Ans&# 18. (n A)*.NET the C authorization D section contain

which o+ the +ollowin, elements? A. C den1 D ". C allow D #. "oth A4 and "4 %. None o+ the A-ove Ans&# 19. The t1pe o+ code +ound in #ode5"ehind class is //////// ? A. )erver5side code ". #lient5side code #. "oth A4 and "4 %. None o+ the a-ove Ans&A 1:. #ommon t1pe s1stem is -uilt into which o+ the +ollowin,& A. #$ ". #T #. #3 %. BA# Ans& A 1;. The actual work process o+ A)*.NET is taken care -1 /////////////? A. inetin+o.e@e ". aspnet/isapi.dll #. aspnet/wp.e@e %. None o+ the A-ove Ans& # 1?. 3hich o+ the +ollowin, denote the propert1 in ever1 validation control? A. #ontrolTo6alidate propert1 ". Te@t propert1 #. "oth A4 and "4 %. None o+ the A-ove Ans& # '1. )uppose one wants to modi+1 a )EA* messa,e in a )EA* e@tension then how this can -e achieved. #hoose the correct option +rom -elow& A. Ene must override the method eceive!essa,e ". Ene must override the method (nitialize!ethod #. "oth A4 and "4 %. Ene must override the method *rocess!essa,e Ans& A

''. 3hich o+ the +ollowin, can -e used to add alternatin, color scheme in a epeater control? A. Alternatin,(temTemplate ". %ata)ource #. #olor6alidator %. None o+ the A-ove Ans&A ';. 3hich o+ the +ollowin, is T 0E a-out 3indows Authentication in A)*.NET? A. Automaticall1 determines role mem-ership ". ole mem-ership determined onl1 -1 user pro,rammin, #. A)*.NET does not support 3indows Authentication %. None o+ the A-ove Ans& A '<. 3hat ta,s one need to add within the asp&data,rid ta,s to -ind columns manuall1? A. )et AutoBenerate#olumns *ropert1 to +alse on the data,rid ta, ". )et AutoBenerate#olumns *ropert1 to true on the data,rid ta, #. (t is not possi-le to do the operation %. )et Automaunal#olumns *ropert1 to true on the data,rid ta, Ans& A '?. 3hich method do 1ou invoke on the %ataAdapter control to load 1our ,enerated dataset with data? A. $oad F 4 ". FillF 4 #. %ata$ist %. %ata"ind Ans&" 2A. (n A)*.NET the sessions can -e dumped -1 usin, A. )ession.%ump ". )ession.A-andon #. )ession.E@it %. None o+ the A-ove Ans& " 21. A)*.NET is a ///////////////////////// ? A. )erver )ide )criptin, Technolo,1 ". #lient )ide )criptin, Technolo,1

#. *ro,rammin, $an,ua,e %. %ata-ase *ro,rammin, $an,ua,e same as )Q$. Ans&A 22. A)* stands +or //////////// ? A. Active )ide *a,es ". Active )cript *a,es #. Active )erver *a,e %. Active )cript *ro,ram Ans&# 28. A)*.NET provides increased per+ormance -1 ////////////////////? A. supportin, active varia-les. ". runnin, #$ . #. runnin, compiled code. %. usin, (() )erver Ans& # 29. 3hat is the e@tension o+ A)*.NET we- pa,es +iles A. .ash@ ". .asp@ #. .asp %. .asc@ Ans& " 2:. Gow would 1ou displa1 AmpersandFH4 in $a-el? 0se!nemonic *ropert1 to +alse 0se!nemonic *ropert1 to true 0se dou-le HH 0se /H Ans&# 2;. =ou create a )Il#ommand o-.ect JcomK in order to e@ecute a )Q$ Quer1 on a data-ase ta-le. 3hich code snippet should 1ou use in order to select all records +rom the ta-le J#ustomersK? a. com.#ommandTe@t L J)E$E#T M F E! #ustomersKN com.#ommandT1pe L#ommandT1pe.)tored*rocedureN -. com.#ommandTe@t L J)E$E#T M F E! #ustomersKN com.#ommandT1pe L #ommandT1pe.Ta-le%irectN c. com.#ommandTe@t L J#ustomersKN com.#ommandT1pe L #ommandT1pe.Te@tN d. com.#ommandTe@t L J#ustomersKN

com.#ommandT1pe L #ommandT1pe.Ta-le%irectN Ans& d 2?. =ou add a *rint*review%ialo, ppd1 to 1our 3indows Form> in order +or 1our users to preview the document which the1 want to print. 3hich propert1 o+ ppd1 should 1ou set in order to speci+1 the document to preview? a. *review%ocument -. *rint%ocument c. %ocument d. Active%ocument Ans& c //////////////////////////////////////// Quiz # ' 1. A)*.NET is a ///////////////////////// ? A. )erver )ide )criptin, Technolo,1 ". #lient )ide )criptin, Technolo,1 #. *ro,rammin, $an,ua,e %. %ata-ase *ro,rammin, $an,ua,e same as )Q$. Ans&A '4 3hen an .asp@ pa,e is reIuested +rom the weserver> the output will -e rendered to -rowser in +ollowin, +ormat. a4 GT!$ -4 O!$ c4 3!$ d4 P)* Ans& a 24 The Asp.net server control> which provides an alternative wa1 o+ displa1in, te@t on we- pa,e> is a4 C asp&la-el D -4 C asp&listitem D c4 C asp&-utton D Ans& a 84 The +irst event to -e tri,,ered in an asp@ pa,e is. a4 *a,e/$oadF4 -4 *a,e/(nitF4 c4 *a,e/clickF4 Ans& 94 *ost-ack occurs in which o+ the +ollowin, +orms. a4 3in+orms -4 GT!$Forms

c4 3e-+orms Ans& c :4 3hat namespace does the 3e- pa,e -elon, in the .NET Framework class hierarch1? a4 )1stem.we-.0(.*a,e -4 )1stem.3indows.*a,e c4 )1stem.3e-.pa,e Ans& a ;4 3hich method do 1ou invoke on the %ata Adapter control to load 1our ,enerated dataset? a4 FillF 4 -4 E@ecuteQuer1F 4 c4 eadF 4 Ans& a <4 Gow do 1ou re,ister a user control? a4 Add Ta, pre+i@> Ta, name -4 Add )ource> Ta, pre+i@ c4 Add )rc> Ta,pre+i@> Ta,name Ans& c 1A4 To add a custom control to a 3e- +orm we have to re,ister with. a4 Ta,*re+i@ -4 Name space o+ the dll that is re+erenced c4 Assem-l1name d4 All o+ the a-ove Ans& d 114 #ustom #ontrols are derived +rom which o+ the classes a4 )1stem.3e-.0(.3e-control -4 )1stem.3e-.0(.#ustomcontrol c4 )1stem.3e-.0(.#ustomcontrols.3e-control Ans& c 1'4 Gow A)*.Net %i++erent +rom classic A)*? a4 )criptin, is separated +rom the GT!$> #ode is interpreted seperatel1 -4 )criptin, is separated +rom the GT!$> #ode is compiled as a %$$> the %$$s can -e e@ecuted on server c4 #ode is separated +rom the GT!$ and interpreted #ode is interpreted separatel1 Ans& 124 3hatQs the di++erence -etween esponse.3riteF4

and esponse.Eutput.3riteF4? a4 esponse.Eutput.3riteF4 allows 1ou to +lush output -4 esponse.Eutput.3riteF4 allows 1ou to -u++er output c4 esponse.Eutput.3riteF4 allows 1ou to write +ormatted output d4 esponse.Eutput.3riteF4 allows 1ou to stream output Ans& c 184 3h1 is Blo-al.asa@ is used? a4 (mplement application and session level events -4 %eclare Blo-al varia-les c4 No use Ans& a 194 There can -e more than 1 machine.con+i, +ile in a s1stem a4 True -4 False Ans& 1:4 3hat is the e@tension o+ a we- user control +ile? a4 .Asm@ -4 .Asc@ c4 .Asp@ Ans& 1;4 3hich o+ the +ollowin, is true? a4 (s*ost"ack is a method o+ )1stem.0(.3e-.*a,e class -4 (s*ost"ack is a method o+ )1stem.3e-.0(.*a,e class c4 (s*ost"ack is a readonl1 propert1 o+ )1stem.3e-.0(.*a,e class Ans& c 1<4 The num-er o+ +orms that can -e added to a asp@ pa,e is. a4 1 -4 ' c4 2 d4 !ore than 2 Ans& a 1?4 Gow do 1ou mana,e states in asp.net application a4 )ession E-.ects

-4 Application E-.ects c4 6iewstate d4 All o+ the a-ove Ans& d 'A4 3hich propert1 o+ the session o-.ect is used to set the local identi+ier? a4 )ession(d -4 $#(% c4 (tem d4 Re1 Ans& a '14 )elect the cachin, t1pe supported -1 A)*.Net a4 Eutput #achin, -4 %ata#achin, c4 a and d4 none o+ the a-ove Ans& c '24 )elect the t1pe *rocessin, model that asp.net simulate a4 Event5driven -4 )tatic c4 $inear d4 Topdown Ans& a '84 %oes the Ena-le6iew)tate allows the pa,e to save the users input on a +orm? a4 =es -4 No Ans& a '94 3hich %$$ translate O!$ to )Q$ in (()? a4 )Q$()A*(.dll -4 )Q$O!$.dll c4 $()O!$.dll d4 )Q$(().dll Ans& a ';4 )elect the control which does not have an1 visi-le inter+ace. a4 %atalist -4 %ropdown$ist c4 epeater d4 %ata,rid Ans& c

'<4 Gow do 1ou e@plicitl1 kill a user session? a4 )ession.#loseF 4 -4 )ession.%iscardF 4 c4 )ession.A-andon d4 )ession.End e4 )ession.E@it Ans& c '?4 3hich o+ the +ollowin, is not a mem-er o+ A%E%"#ommand o-.ect? a4 E@ecute eader -4 E@ecute)calar c4 E@ecute)tream d4 Epen e4 #ommandTe@t Ans& d 2A4 3hich one o+ the +ollowin, namespaces contains the de+inition +or (d-#onnection? a4 )1stem.%ata.(nter+aces -4 )1stem.%ata.#ommon c4 )1stem.%ata d4 )1stem.%ata.#onnection Ans& c 214 3hat is +ull +orm o+ #$ ? A. #ommon $inI untime ". #ommon $an,au,e untime #. #ommon $an,au,e emote %. #ondition $an,au,e untime Ans& " 2'4 3hich propert1 o+ A)*.NET #ontrol is used to set st1le class ? A. #lass propert1 ". #ss)t1le *ropert1 #. #ss#lass propert1 %. )t1le#lass propert1 Ans& # 224 Gow can ( turn o++ viewstate +or all we- pa,es in a site ? A. Add the -elow line within the in we-.con+i, & ". Add -elow line in all the pa,es &CST *a,e $an,ua,eLK6"K Ena-le6iew)tateLK+alseK SD #. )et Ena-le6iew)tateLK+alseK +or all controls in all

pa,es Ans& A //////////////////////////////////////// Quiz # 2 1. A)* server scripts are surrounded -1 delimiters> which? a. CSDCUSD -. CSSD c. CscriptDCUscriptD d. CHDCUHD Ans& '. Gow do 1ou create a File)1stemE-.ect? a. )erver.#reateE-.ectFJFile)1stemE-.ectK4 -. #reateFJFile)1stemE-.ectK4 c. )erver.#reateE-.ectFJ)criptin,.File)1stemE-.ectK4 d. #reate E-.ect&K)criptin,.File)1stemE-.ectK Ans& c 2. A)* comes with a standard component that displa1s a di++erent advertisement each time a user enters or re+reshes a pa,e> what is the name o+ this component? a. otateAds -. Advertisement c. Advertise d. Ad otator Ans& d 8. KCSLK is the same as& a. CS3rite -. CS%ocument.3rite c. CS esponse.3rite d. CSEIual Ans& c 9. 3hat is the de+ault scriptin, lan,ua,e in A)*? a. *E $ -. Ecma)cript c. 6")cript d. Pava)crip Ans& c :. Gow can 1ou script 1our A)* code in Pava)cript? a. )tart the document with& CS lan,ua,eLK.avascriptK SD

-. End the document with& CS lan,ua,eLK.avascriptK SD c. Pava)cript is the de+ault scriptin, lan,ua,e d. )tart the document with& CST lan,ua,eLK.avascriptK SD Ans&d ;. Gow do 1ou ,et in+ormation +rom a +orm that is su-mitted usin, the J,etK method? a. eIuest.Form -. eIuest.Quer1)trin, Ans& <. Gow do 1ou ,et in+ormation +rom a +orm that is su-mitted usin, the JpostK method? a. eIuest.Form -. eIuest.Quer1)trin, Ans& a ?. *a,e 1 has this link& Ca hre+LKpa,e'.asp?colorL,reenKDBoCUaD Gow can pa,e'.asp ,et the JcolorK parameter? a. eIuest.Quer1)trin,FJcolorK4 -. BetFJcolorK4 c. esponse.*arameterFJcolorK4 d. esponse.Quer1)trin,FJcolorK4 Ans&a 1A. 3hich A)* propert1 is used to identi+1 a user? a. An A)* #ookie -. The Application o-.ect c. The )erver o-.ect Ans& a 11. All users o+ the same application share ENE )ession o-.ect. a. True -. False Ans&1'. All users o+ the same application share ENE Application o-.ect. a. True -. False Ans& a 12. (+ a user has #ookies ena-led> a session varia-le is availa-le to all pa,es in one application. a. True

-. False Ans& a 18. (nclude +iles must have the +ile e@tension J.incK a. False -. True Ans& a 19. 3hat is the correct wa1 to include the +ile Jtime.incK ? a. CS include +ileLKtime.incK SD -. Cinclude +ileLKtime.incKD c. CVW#include +ileLKtime.incKWD d. CS #include +ileLKtime.incK SD Ans& c 1:. 3hich one o+ these events is a standard Blo-al.asa event? a. Blo-al.asa doesnQt have an1 standard events -. Application/En)tart c. )ession/)tart d. )ession/id Ans& 1;. Blo-al.asa is reIuired +or all 3e- sites a. False -. Enl1 +or A)* 3e- sites c. True Ans& a 1<. 3hich o+ these o-.ects is NET an A)* component? a. File Access -. $ink#ounter c. Ad otator d. #ounter Ans&#hapter 3ise Questions #hapter5A1F$esson5A14 1. 3hat is the name o+ the pa,e o-.ectQs propert1 that 1ou can Iuer1 to determine i+ a 3e- pa,e is -ein, reIuested without data -ein, su-mitted? A4 (s#all-ack "4 (s eusa-le #4 (s6alid %4 (s*ost"ack '. 3hich one o+ the +ollowin, GTT* ver-s

indicates that 1ou are creatin, and writin, a +ile on the 3e- server? A4 *0T "4 #ENNE#T #4 *E)T %4 BET #hapter5A1F$esson5A'4 2. (+ 1ou want to create a 3e- site on a remote computer that does not have Front *a,e )erver E@tensions installed> 3hich 3e- site t1pe will 1ou create? A4 emote GTT* "4 File s1stem #4 FT* %4 $ocal GTT* 8. (+ 1ou want to create a new 3e- site on a 3eserver that is hosted -1 1our (nternet service provider F()*4 and the 3e- server has Front *a,e )erver E@tensions installed> what t1pe o+ 3e- site would 1ou create? A4 $ocal GTT* "4 File s1stem #4 FT* %4 emote GTT* 9. (+ 1ou want to separate 1our server5side code +rom 1our client5side la1out code in a 3e- pa,e> what pro,rammin, model should 1ou implement? A4 )in,le5i le model "4 #ode5-ehind model #4 (nline model %4 #lient5server model :. Poe created a new 3e- site usin, 6isual )tudio 'AA<> settin, the 3e- site t1pe to File> and the pro,rammin, lan,ua,e to ##. $ater> Poe received an ela-orate 3e- pa,e +rom his vendor> which consisted o+ the 6endor.asp@ +ile and the 6endor.asp@.v- code5 -ehind pa,e. 3hat must Poe do to use these +iles? A4 Poe can simpl1 add the +iles into the 3e- site> -ecause A)*.NET 2.9 supports 3e- sites that have 3e- pa,es that were pro,rammed with di++erent lan,ua,es. "4 The 6endor.asp@ +ile will work> -ut Poe must

rewrite the code5-ehind pa,e usin, ##. #4 "oth +iles must -e rewritten in ##. %4 Poe must create a new 3e- site that contains these +iles and set a 3e- re+erence to the new site. #hapter5A1F$esson5A24 ;. =ou want to make a con+i,uration settin, chan,e that will -e ,lo-al to all 3e- and 3indows applications on the current computer. 3hich i le do 1ou chan,e? A4 Blo-al.asa@ "4 3e-.con+i, #4 !achine.coni, %4 Blo-al.asa <. =ou want to make a con+i,uration settin, chan,e that will a++ect onl1 the current 3e- application. 3hich i le will 1ou chan,e? A4 3e-.coni, that is in the same +older as the !achine.con+i, +ile "4 3e-.con+i, in the root o+ the 3e- application #4 !achine.con+i, %4 Blo-al.asa@ ?. =ou want to make a con+i,uration settin, chan,e that will a++ect onl1 the current 3e- application> and 1ou want to use a tool that has a user5+riendl1 B0(. 3hich tool should 1ou use? A4 Notepad "4 !icroso+t 3ord #4 Epen directl1 with 6isual )tudio %4 3)AT #hapter5A'F$esson5A14 1A. To add an GT!$ server control to a 3e- pa,e> 1ou must dra, an GT!$ element +rom the Tool-o@ to the 3e- pa,e and then per+orm which o+ the +ollowin, tasks? A4 Add the attri-ute runLKserverK to the control element in )ource view. "4 %ou-le5click the GT!$ element to convert it to an GT!$ server control. #4 Add the attri-ute runatLKserverK to the control element in )ource view. %4 )elect the GT!$ element in %esi,n view and set the un At propert1 to true in the *roperties

window. 11. =ou noticed that clickin, a #heck"o@ does not cause an automatic *ost"ack. =ou need the #heck"o@ to *ost"ack so 1ou can update the 3epa,e -ased on server5side code. Gow do 1ou make the #heck"o@ cause an automatic *ost"ack? A4 )et the Auto*ost"ack propert1 to true. "4 Add Pava)cript code to call the Force*ost"ack method. #4 )et the *ost"ackAll propert1 o+ the 3e- pa,e to true. %4 Add server5side code to listen +or the click event +rom the client. 1'. =ou need to d1namicall1 create an instance o+ a Te@t"o@ server control in 1our code. (n which pa,e event would 1ou create the server control to ensure that the view state is properl1 reconnected to the control on *ost"ack? A4 *re(nit "4 (nit #4 $oad %4 *re ender 12. =ou need to write code to d1namicall1 create a new instance o+ a Te@t"o@ server control. =ou want to make sure the Te@t"o@ control displa1s on the 3epa,e. 3hich action do 1ou take? A4 #all the )how#ontrol method on the Te@t"o@. "4 )et the 6isi-le propert1 to true on the Te@t"o@. #4 #all the Add method o+ the *a,e class to add 1our Te@t"o@ instance to the pa,e. %4 #all the Add method o+ the +orm1.#ontrols collection to add 1our Te@t"o@ instance to the pa,e. #hapter5A'F$esson5A'4 18. (+ 1ou want multiple adio"utton controls to -e mutuall1 e@clusive> what propert1 must 1ou set? A4 E@clusive "4 !utuall1E@clusive #4 Brouped %4 BroupName 19. =ou are creatin, a 3e- pa,e that has several related -uttons> such as +ast +orward> reverse> pla1> stop> and pause. =ou want to create a sin,le event

handler that process the *ost"ack +rom these "utton controls. Ether than the normal su-mit -utton> what t1pe o+ -utton can 1ou create as a solution? A4 EneTo!an1 "4 #ommand #4 eset %4 !an1ToEne 1:. (n %esi,n view> what is the simplest wa1 to create an event handler +or the de+ault event o+ a server control? A4 Epen the code5-ehind pa,e and write the code. "4 i,ht5click the control and select #reate Gandler. #4 %ra, an event handler +rom the Tool-o@ to the desired control. %4 %ou-le5click the control. #hapter5A'F$esson5A24 1;. 3hich o+ the +ollowin, represents the -est use o+ the Ta-le> Ta-le ow> and Ta-le#ell controls? A4 #reatin, and populatin, a ta-le in %esi,n view "4 #reatin, a customized control that needs to displa1 data in a ta-ular +ashion #4 #reatin, a ta-le o+ static ima,es stored in a +older on 1our site %4 %ispla1in, a ta-ular result set 1<. =our ,raphics department .ust completed an ela-orate ima,e that shows the product lines that 1our compan1 sells. )ome o+ the product line ,raphics are circular> others are rectan,ular> and others are comple@ shapes. =ou want to use this ima,e as a menu on 1our 3e- site. 3hat is the -est wa1 to incorporate the ima,e into 1our 3e- site? A4 0se (ma,e"utton and use the @5 and 15 coordinates that are returned when the user clicks to i ,ure out what product line the user clicked. "4 0se the Ta-le> Ta-le ow> and Ta-le#ell controls> -reak the ima,e into pieces that are displa1ed in the cells> and use the Ta-le#ell controlQs #lick event to identi+1 the product line that was clicked. #4 0se the !ulti6iew control and -reak up the ima,e into pieces that can -e dis5pla1ed in each 6iew

control +or each product line. 0se the #lick event o+ the 6iew to identi+1 the product line that was clicked. %4 0se an (ma,e!ap control and dei ne hot spot areas +or each o+ the product lines. 0se the *ost"ack6alue to identi+1 the product line that was clicked. 1?. =ou are writin, a 3e- site that collects a lot o+ data +rom 1our users. The data collec5tion spreads over multiple 3e- pa,es. 3hen the user reaches the last pa,e> 1ou need to ,ather all o+ the data> validate it> and save it to the data-ase. =ou notice that it can -e rather di+icult to ,ather the data that is spread over multiple pa,es and 1ou want to simpli+1 the development o+ this application. 3hat control should 1ou use to solve this pro-lem? A4 The 6iew control "4 The Te@t"o@ control #4 The 3izard control %4 The %ata#ollection control #hapter5A2F$esson5A14 'A. =ou need to validate a vendor (% entered -1 a user. The valid vendor (%s e@ist in a data-ase ta-le. Gow can 1ou validate this input? A4 *rovide a e,ularE@pression6alidator and set the 6alidationE@pression propert1 to U%-$ookupXcodeY. "4 *rovide a an,e6alidator and set the !in6alue propert1 to %-$ookupFcode4 and set the !a@6aue propert1 to %-$ookupFcode4. #4 *rovide a #ustom6alidator with server5side code to search the data-ase +or the code. %4 *rovide a #ompare6alidator and set the compare e@pression to the name o+ a server5side +unction that per+orms a data-ase lookup o+ the code. '1. =ou created a 3e- pa,e that contains man1 controls that are validated usin, valida5tion controls. This pa,e also contains "utton controls that per+orm *ost"acks. =ou disa-led all o+ the client5side validation and noticed that when 1ou clicked an1 o+ the "utton controls> the code in the #lick event handler was e@ecutin, even when some o+ the controls did not have valid data. Gow can 1ou -est

solve this pro-lem to ensure code is not e@ecuted when invalid data e@ists? A4 (n the #lick event handler method +or each o+ 1our "utton controls> test the 3e- pa,eQs (s6alid propert1 and e@it the method i+ this propert1 is +alse. "4 (n the $oad event handler method o+ the 3epa,e> test the 3e- pa,eQs (s6alid propert1 and e@it the method i+ this propert1 is +alse. #4 e5ena-le the client5side script to disa-le *ost"ack until valid data e@ists. %4 Add the runatLKserverK attri-ute to all o+ the validation controls. ''. =ou have created an ela-orate 3e- pa,e that contains man1 validated controls. =ou want to provide a detailed messa,e +or each validation error> -ut 1ou donQt have space to provide the detailed messa,e ne@t to each control. 3hat can 1ou do to indicate an error at the control and list the detailed error messa,es at the top o+ the 3e- pa,e? A4 )et the Te@t propert1 o+ the validator control to the detailed messa,e and set the Error!essa,e propert1 to an asterisk. *lace a 6alidation)ummar1 control at the top o+ the 3e- pa,e. "4 )et the Error!essa,e propert1 o+ the validator control to the detailed messa,e and set the Te@t propert1 to an asterisk. *lace a 6alidation)ummar1 control at the top o+ the 3e- pa,e. #4 )et the ToolTip propert1 o+ the validator control to the detailed messa,e and set the Error!essa,e propert1 to an asterisk. *lace a 6alidation)ummar1 control at the top o+ the 3e- pa,e. %4 )et the ToolTip propert1 o+ the validator control to the detailed messa,e and set the Te@t propert1 to an asterisk. *lace a 6alidation)ummar1 control at the top o+ the 3e- pa,e. #hapter5A2F$esson5A'4 '2. 3hich o+ the +ollowin, server5side methods o+ the Gttp)erver0tilit1 class can -e used to navi,ate to a di++erent 3e- pa,e without reIuirin, a round trip to the client? A4 edirect "4 !ap*ath

#4 Trans+er %4 0rl%ecode '8. 3hich control automaticall1 uses the 3e-.sitemap i le to displa1 site map in+ormation to a user on a 3e- pa,e? A4 !enu "4 Tree6iew #4 )ite!ap%ata)ource %4 )ite!ap*ath '9. =ou want to provide an 0p -utton +or 1our 3epa,es to pro,rammaticall1 navi,ate the site map. 3hich class can 1ou use to access the site map content to accomplish this? A4 )ite!ap*ath "4 )ite!ap%ata)ource #4 )ite!ap %4 Gttp)erver0tilit1 E4 #hapter5A8F$esson5A14 ':. =ou need to store a userQs user name and password as he or she navi,ates to di++erent pa,es on 1our site so that 1ou can pass those credentials to -ack5end servers. 3hich t1pe o+ state mana,ement should 1ou use? A4 #lient5side state mana,ement "4 )erver5side state mana,ement ';. =ou need to track nonconi dential user pre+erences when a user visits 1our site to minimize additional load on 1our servers. =ou distri-ute reIuests amon, multiple 3e- servers> each runnin, a cop1 o+ 1our application. 3hich t1pe o+ state mana,ement should 1ou use? A4 #lient5side state mana,ement "4 )erver5side state mana,ement '<. =ou are creatin, an A)*.NET 3e- pa,e that allows a user to -rowse in+ormation in a data-ase. 3hile the user accesses the pa,e> 1ou need to track search and sortin, values. =ou do not need to store the in+ormation -etween visits to the 3e- pa,e. 3hich t1pe o+ client5side state mana,ement would meet 1our reIuirements and -e the simplest to implement?

A4 6iew state "4 #ontrol state #4 Gidden ields %4 #ookies E4 Quer1 strin,s '?. =ou are creatin, an A)*.NET 3e- site with dozens o+ pa,es. =ou want to allow the user to set user pre+erences and have each pa,e process the pre+erence in+ormation. =ou want the pre+erences to -e remem-ered -etween visits> even i+ the user closes the -rowser. 3hich t1pe o+ client5side state mana,ement meets 1our reIuirements and is the simplest to implement? A4 6iew state "4 #ontrol state #4 Gidden ields %4 #ookies E4 Quer1 strin,s 2A. =ou are creatin, an A)*.NET 3e- +orm that searches product inventor1 and displa1s items that match the userQs criteria. =ou want users to -e a-le to -ookmark or e5mail search results. 3hich t1pe o+ client5side state mana,ement meets 1our reIuirements and is the simplest to implement? A4 6iew state "4 #ontrol state #4 Gidden ields %4 #ookiese. E4 Quer1 strin,s #hapter5A8F$esson5A'4 21. (n which i le should 1ou write code to respond to the Application/)tart event? A4 An1 A)*.NET server pa,e with an .asp@ e@tension "4 3e-.coni , #4 Blo-al.asa@ %4 An1 A)*.NET server pa,e with an .asp@.v- or .asp@.cs e@tension 2'. =ou need to store state data that is accessi-le to an1 user who connects to 1our 3e- application. 3hich collection o-.ect should 1ou use? A4 )ession

"4 Application #4 #ookies %4 6iew)tate 22. =ou need to store a value indicatin, whether a user has -een authenticated +or 1our site. This value needs to -e availa-le and checked on ever1 user reIuest. 3hich o-.ect should 1ou use? A4 )ession "4 Application #4 #ookies %4 6iew)tate 28. =ou need to lo, data to a data-ase when a userQs session times out. 3hich event should 1ou respond to? A4 Application/)tart "4 Application/End #4 )ession/)tart %4 )ession/End 29. =our application is -ein, deplo1ed in a load5 -alanced 3e- +arm. The load -alancer is not set up +or user server a+init1. ather> it routes reIuests to servers -ased on their load. =our application uses session state. Gow should 1ou coni,ure the )ession)tate mode attri-ute? F#hoose all that appl1.4 A4 )tate)erver "4 (n*roc #4 E++ %4 )Il)erver #hapter5A9F$esson5A14 2:. 3hich o+ the +ollowin, statements a-out re+erencin, master pa,e mem-ers is true? F#hoose all that appl1.4 A4 #ontent pa,es can re+erence private properties in the master pa,e. "4 #ontent pa,es can re+erence pu-lic properties in the master pa,e. #4 #ontent pa,es can re+erence pu-lic methods in the master pa,e. %4 #ontent pa,es can re+erence controls in the master pa,e. 2;. =ou are convertin, an e@istin, 3e- application to use master pa,es. To maintain compati-ilit1> 1ou

need to read properties +rom the master pa,e. 3hich o+ the +ollowin, chan,es are 1ou reIuired to make to .asp@ pa,es to ena-le them to work with a master pa,e? F#hoose all that appl1.4 A4 Add an T !asterT1pe declaration. "4 Add an T !aster declaration. #4 Add a !aster*a,eFile attri-ute to the T *a,e declaration. %4 Add a #ontent*laceGolder control. 2<. =ou need to d1namicall1 chan,e the master pa,e o+ a content pa,e. (n which pa,e event should 1ou implement the d1namic chan,in,? A4 *a,e/$oad "4 *a,e/ ender #4 *a,e/*re ender %4 *a,e/*re(nit #hapter5A9F$esson5A'4 2?. 3hich o+ the +ollowin, theme applications will override an attri-ute that 1ou speciied directl1 on a control? F#hoose all that appl1.4 A4 A theme specii ed usin, T *a,e ThemeLK!1ThemeK "4 A theme specii ed usin, T *a,e )t1le)heetThemeLK!1ThemeK #4 Cpa,es ThemeLKthemeNameKD element in the 3e-.coni, +ile %4 Cpa,es )t1le)heetThemeLKthemeNameKD element in the 3e-.coni, +ile 8A. 3hich o+ the +ollowin, is a valid skin dei nition inside a skin i le? A4 Casp&$a-el (%LK$a-el1Z "ack#olorLK#FFEA#AZ Fore#olorLK edK Te@tLK$a-elKD CUasp&$a-elD "4 Casp&$a-el (%LK$a-el1Z runatLKserverK "ack#olorLK#FFEA#AZ Fore#olorLK edK Te@tLK$a-elKDCUasp&$a-elD #4 Casp&$a-el runatLKserverK "ack#olorLK#FFEA#AZ Fore#olorLK edKD CUasp&$a-elD %4 Casp&$a-el "ack#olorLK#FFEA#AZ Fore#olorLK edKDCUasp&$a-elD 81. =ou need to allow users to choose their own

themes. (n which pa,e event should 1ou speci+1 the user5selected theme? A4 *a,e/$oad "4 *a,e/ ender #4 *a,e/*re ender %4 *a,e/*re(nit #hapter5A9F$esson5A24 8'. 3hich o+ the +ollowin, can -e a 3e- *art? F#hoose all that appl1.4 A4 A control -ased on the 3e- user control template "4 A standard $a-el control #4 A t1pe derived +rom 3e-*art %4 A master pa,e 82. 3hich o+ the +ollowin, are reIuired to ena-le users to chan,e the title o+ a 3e- *art? F#hoose all that appl1.4 A4 $a1outEditor*art "4 Editor[one #4 #atalo,[one %4 AppearanceEditor*art 88. =ou have developed a 3e- pa,e with man1 di++erent 3e- *art components. )ome 3e- *arts are ena-led -1 de+ault> and 1ou want to ,ive the user the a-ilit1 to displa1 others. 3hich classes should 1ou use? F#hoose all that appl1.4 A4 $a1outEditor*art "4 %eclarative#atalo,*art #4 #atalo,[one %4 AppearanceEditor*art 89. =ou have created a 3e- *art control that prompts the user +or personalization in+ormation> includin, his or her name> re,ion> and pre+erences. =ou want other controls to -e a-le to read in+ormation +rom this control to customize the in+ormation the1 displa1. Gow should 1ou modi+1 1our 3e- *art to ena-le other 3e- *arts to connect to it? A4 #reate a method that shares the userQs in+ormation and add the #onnection5#onsumer attri-ute to that method. "4 #reate a method that shares the userQs

in+ormation and add the #onnection*rovider attri-ute to that method. #4 #reate a pu-lic propert1 that shares the userQs in+ormation and add the #onnection #onsumer attri-ute to that method. %4 #reate a pu-lic propert1 that shares the userQs in+ormation and add the #onnection *rovider attri-ute to that method. #hapter5A:F$esson5A14 8:. =ou need to write a pa,e that contains a section that should -e updated -ased on a userQs action. This update should happen independentl1 o+ the rest o+ the pa,e to minimize screen re+resh and maintain user conte@t. 3hich controls must 1ou add to the pa,e to ena-le this scenario? F#hoose all that appl1.4 A4 0pdate*anel "4 As1nc*ost"ackTri,,er #4 )cript!ana,er*ro@1 %4 )cript!ana,er 8;. =ou need to write a control that will -e used across multiple pa,es. This control should contain updated sales +i,ures. The control should update itsel+ at various intervals i+ a containin, pa,e is le+t open. 3hich controls should 1ou use to ena-le this scenario? F#hoose all that appl1.4 A4 0pdate*anel "4 Timer #4 )cript!ana,er %4 )cript!ana,er*ro@1 8<. =ou have an 0pdate*anel dei ned on a pa,e. =ou need to indicate that a ,iven "utton control outside o+ the 0pdate*anel should cause the 0pdate*anel to e@ecute an update. 3hat steps should 1ou take? A4 )et the As1nc*ost"ackTri,,er attri-ute o+ the 0pdate*anel to the (% o+ the "utton control. "4 )et the As1nc*ost"ackTri,,er attri-ute o+ the "utton control to the (% o+ the 0p5date*anel. #4 Add a Tri,,er control to the As1nc*ost"ackTri,,ers section o+ the 0pdate*anel. the #ontrol(% attri-ute o+ the Tri,,er control to the (% o+ the "utton control.

%4 Add an As1nc*ost"ackTri,,er control to the Tri,,ers section o+ the 0pdate*anel. )et the #ontrol(% attri-ute o+ the As1nc*ost"ackTri,,er control to the (% o+ the "utton control. 8?. =ou are writin, a pa,e that contains an 0pdate*anel +or partial5pa,e updates. =ou wish to noti+1 the user that the update is processin, onl1 i+ the update takes lon,er than 9 seconds. 3hich actions should 1ou take? A4 Add a second 0pdate*anel to the pa,e. )et it to tri,,er -ased on the irst 0p5date*anel. )et the contents o+ this 0pdate*anel to read J*rocessin,> please wait.K "4 Add an 0pdate*ro,ress control to the 0pdate*anel. )et its %ispla1A+ter attri-ute to 9>AAA. )et its *ro,ressTemplate contents to read J*rocessin,> please wait.K #4 Add a *ro,ress"ar control to the pa,e. 3rite code on the server to call -ack to the client as1nchronousl1 to update the *ro,ress"ar control a+ter 9 seconds. %4 #reate a hidden CdivD ta, on 1our pa,e that contains the te@t J*rocessin,> please wait.K )et the CdivD ta,Qs (% to match that o+ the 0pdate*anel. )et the 0pdate*anel controlQs (nterval propert1 to 9>AAA. #hapter5A:F$esson5A'4 9A. 3hich o+ the +ollowin, lines o+ Pava)cript re,isters a new class 1ou intend to use as an e@tension to a %E! element? A4 !1Namespace.!1#lass.re,ister#lassF\!1Namespa ce.!1#lass \> )1s.0(.#ontrol4N "4 !1Namespace.!1#lass.re,ister#lassF\!1Namespa ce.!1#lass \> null> )1s.(%is5posa-le4N #4 !1Namespace.!1#lass.re,ister#lassF\!1Namespa ce.!1#lass \> null4N %4 !1Namespace.!1#lass.re,ister#lassF\!1Namespa ce.!1#lass \> )1s.0(."ehavior4N 91. =ou are writin, an APAO component that does

an as1nchronous *ost"ack to the server +or partial5 pa,e updates. =ou need 1our code to -e noti+ied when the partial5pa,e response +irst comes -ack +rom the server. 3hich event should 1ou intercept? A4 end eIuest "4 pa,e$oadin, #4 pa,e$oaded %4 -ein, eIuest 9'. =ou write a Pava)cript class that uses the !icroso+t APAO $i-rar1. =ou intend to use the class on a 3e- pa,e. 3hich o+ the +ollowin, actions should 1ou take? A4 Add the +ollowin, markup to the Chead UD section o+ the .asp@ pa,e&Cscript srcLK#ontoso0tilities..sK t1peLKte@tU.avascriptKDCUscriptD "4 Add a )cript!ana,er control to 1our pa,e. (t automaticall1 +inds 1our ..s +iles in 1our solution. =ou can then work with them usin, (ntelli)ense. #4 Add a )cript!ana,er control to 1our pa,e. Add a re+erence nested inside the )cript!ana,er control that points 1our Pava)cript +ile. %4 0se the )cript e+erence class in 1our code5 -ehind +ile and set its path to the path o+ 1our ..s +ile. 92. =ou wish to create a custom control that works as an APAO client -ehavior. 3hat actionFs4 should 1ou take? F#hoose all that appl1.4 A4 #reate a custom> server5side class that inherits +rom a valid )1stem.3e-.0(.#ontrol. "4 #reate a custom> server5side class that inherits +rom E@tender#ontrol. #4 #reate a custom> server5side class that implements the inter+ace ()cript#ontrol. %4 #reate a custom> server5side class that is decorated with the attri-ute Tar,et#on5trolT1pe. #hapter5A;F$esson5A14 98. =ou have a %ata)et containin, a #ustomer %ataTa-le and an Erder %ataTa-le. =ou want to easil1 navi,ate +rom an Erder %ata ow to the #ustomer who placed the order. 3hat o-.ect will allow 1ou to easil1 navi,ate +rom the Erder to the #ustomer?

A4 The %ata#olumn o-.ect "4 The %ataTa-le o-.ect #4 The %ata ow o-.ect %4 The %ata elation o-.ect 99. 3hich o+ the +ollowin, is a reIuirement when mer,in, modiied data into a %ata)et? A4 A primar1 ke1 must -e deined on the %ataTa-le o-.ects. "4 The %ata)et schemas must match. #4 The destination %ata)et must -e empt1 prior to mer,in,. %4 A %ata)et must -e mer,ed into the same %ata)et that created it. 9:. =ou are workin, with a %ata)et and want to -e a-le to displa1 data> sorted di++erent wa1s. Gow do 1ou do so? A4 0se the )ort method on the %ataTa-le o-.ect. "4 0se the %ata)et o-.ectQs )ort method. #4 0se a %ata6iew o-.ect +or each sort. %4 #reate a %ataTa-le +or each sort> usin, the %ataTa-le o-.ectQs #op1 method> and then )ort the result. #hapter5A;F$esson5A'4 9;. 3hich o+ the +ollowin, wa1s can 1ou proactivel1 clean up a data-ase connectionQs resources? F#hoose two.4 A4 E@ecute the %-#onnection o-.ectQs #leanup method. "4 E@ecute the %-#onnection o-.ectQs #lose method. #4 Assi,n Nothin, F## null4 to the varia-le that re+erences the %-#onnection o-.ect. %4 #reate a 0sin, -lock +or the %-#onnection o-.ect. 9<. 3hat event o+ the )Il#onnection class can 1ou su-scri-e to i+ 1ou want to displa1 in+ormation +rom )Q$ *rint statements? A4 (n+o!essa,e "4 !essa,e eceived #4 *osted!essa,e %4 New(n+o 9?. To per+orm as1nchronous data access> what

must -e added to the connection strin,? A4 "e,inE@ecuteLtrue "4 !ultiThreadedLtrue #4 !ultipleActive esult)etsLtrue %4 As1nchronous *rocessin,Ltrue :A. 3hich o+ the +ollowin, steps must 1ou take to write code usin, $(NQ to )Q$? F#hoose all that appl1.4 A4 Benerate an EU map o+ 1our data-ase. "4 e+erence the )1stem.%ata.$inI namespace. #4 #onnect to 1our data-ase throu,h a %ata#onte@t o-.ect. %4 0se a Brid6iew control to map 1our data-ase to $(NQ. #hapter5A;F$esson5A24 :1. 3hich class can -e used to create an O!$ document +rom scratch? A4 Oml#onvert "4 Oml%ocument #4 OmlNew %4 Oml)ettin,s :'. 3hich class can -e used to per+orm data t1pe conversion -etween .NET Framework data t1pes and O!$ t1pes? A4 OmlT1pe "4 Oml#ast #4 Oml#onvert %4 Oml)ettin,s :2. =ou are writin, a +unction that accepts a strin, as a parameter. The strin, data will -e sent to the +unction in the +orm o+ O!$. =ou need to write $(NQ to O!$ code to Iuer1 this O!$ and process it. 3hat steps should 1ou take? F#hoose all that appl1.4 A4 0se the OElement.$oad method to load the O!$ data into a new OElement. "4 0se the OElement.*arse method to load the O!$ data into a new OElement. #4 %e+ine a Iuer1 varia-le o+ t1pe (Enumera-leCD where the ,eneric t1pe is set to OElement. %4 %e+ine a Iuer1 varia-le o+ t1pe (Enumera-leCD

where the ,eneric t1pe is set to the value o+ the strin, parameter passed to the +unction. #hapter512F$esson514 :8. =ou need to create a 3e- pa,e that is availa-le in -oth the de+ault lan,ua,e o+ En,lish and in Berman. 3hich o+ the +ollowin, resource +i les should 1ou create? F#hoose all that appl1.4 A4 App/$ocal esourcesU*a,e.asp@.res@.de "4 App/$ocal esourcesU*a,e.asp@.res@ #4 App/$ocal esourcesU*a,e.asp@.de.res@ %4 App/$ocal esourcesU*a,e.asp@.en.res@ :9. 3hat must 1ou do to ena-le users to select their own lan,ua,e pre+erences? F#hoose all that appl1.4 A4 %e+i ne the *a,e.#ulture propert1. "4 %e+i ne the *a,e.0(#ulture propert1. #4 Everride the *a,e.(nitialize#ulture method. %4 Everride the *a,e. ead)trin, esource method. ::. Gow can 1ou de+i ne a control propert1 usin, a ,lo-al resource at desi,n time? A4 (n 6isual )tudio> de+i ne the %ata6alueField propert1. "4 (n 6isual )tudio> de+i ne the %ata)ource(% propert1. #4 (n 6isual )tudio> edit the Te@t propert1. %4 (n 6isual )tudio> edit the FE@pressions4 propert1. :;. =ou add a ,lo-al resource with the name $o,in -1 usin, 6isual )tudio. Gow can 1ou access that ,lo-al resource pro,rammaticall1? A4 esources. esource.$o,in "4 esources. esourceFJ$o,inK4 #4 esourcesFJ$o,inK4 %4 esources.$o,in #hapter512F$esson5'4 :<. 3hich (ma,e properties can 1ou de+ine to ena-le screen readers to descri-e a picture on a 3epa,e? F#hoose all that appl1.4 A4 AccessRe1 "4 AlternateTe@t #4 %escription0rl %4 ToolTip :?. 3hich o+ the +ollowin, are accessi-ilit1 +eatures provided -1 A)*.NET? F#hoose all that

appl1.4 A4 #ontrols provide properties that ena-le 1ou to provide hidden descriptions that are availa-le to screen readers. "4 #ontrols are displa1ed in hi,h contrast -1 de+ault. #4 #ontrols that include a list o+ links at the top provide hidden links to skip over the links. %4 #ontrols displa1 te@t in lar,e +ont sizes -1 de+ault. ;A. For which o+ the +ollowin, ,uidelines does A)*.NET provide automated testin,? F#hoose all that appl1.4 A4 3#AB *riorit1 1 "4 3#AB *riorit1 ' #4 A%A %4 Access "oard )ection 9A< #hapter518F$esson514 ;1. 3hich o+ the +ollowin, 3e-.con+i, +i les correctl1 ena-les the 3e- application to track the a,e o+ non1mous users in a varia-le o+ t1pe (nt2'? A4 Canon1mous(denti+ication ena-ledLKtrueK UD Cpro+ileD CpropertiesD Cadd nameLKA,eK t1peLK)1stem.(nt2'Z allowAnon1mousLKtrueK UD CUpropertiesD CUpro+ileD "4 Canon1mous(denti+ication ena-ledLKtrueK UD Cpro+ileD CpropertiesD Cadd nameLKA,eK allowAnon1mousLKtrueK UD CUpropertiesD CUpro+ileD #4 Canon1mous(denti+ication ena-ledLKtrueK UD Cpro+ileD CpropertiesD Cadd nameLKA,eK t1peLK)1stem.(nt2'Z UD CUpropertiesD CUpro+ileD %4 Cpro+ileD CpropertiesD

Cadd nameLKA,eK t1peLK)1stem.(nt2'Z UD CUpropertiesD CUpro+ileD ;'. =ou wish to create a user pro+ile that uses a custom t1pe as one o+ the pro+ile properties. 3hat actions must 1ou take? F#hoose all that appl1.4 A4 !ark 1our class as serializa-le. "4 )et the t1pe attri-ute o+ the ,iven pro+ile propert1 to the +ull1 Iuali+ied name o+ 1our custom t1pe. #4 Add the ,roup element to 1our pro+ile propert1. Add one element to the ,roup element +or each propert1 in 1our custom t1pe. )et each elementQs name to match that o+ a propert1 in 1our custom t1pe. %4 Add 1our custom t1pe in the !achine.con+i, +ile in the CcustomT1pesD element. #hapter518F$esson5'4 ;2. 3hich o+ the +ollowin, controls provides a link +or unauthenticated users to lo, on? A4 $o,in "4 $o,in6iew #4 $o,in)tatus %4 $o,inName ;8. =ou use the A)*.NET 3e- )ite Administration Tool to con+i,ure A)*.NET mem-ership with +orms authentication. 3hat should 1ou name 1our lo,in +orm so that 1ou do not have to modi+1 the 3e-.con+i, +ile? A4 $o,in.asp@ "4 $o,in*a,e.asp@ #4 %e+ault.asp@ %4 Auth.asp@ ;9. =ou are creatin, a 3e- +orm that ena-les users to lo, in to 1our 3e- site. 3hich o+ the +ollowin, )*.NET controls should 1ou add to the pa,e? F#hoose two answers.4 A4 $o,in "4 #reate0ser3izard #4 $o,inName %4 *assword ecover1 ;:. =ou have created an A)*.NET 3e- +orm that ena-les users to create accounts with a

#reate0ser3izard control. A+ter a new user creates an account> 1ou want to redirect the user to a pa,e listin, the rules +or 1our 3e- site. To which o+ the +ollowin, events should 1ou respond? A4 #reate0ser3izard.0nload "4 #reate0ser3izard.#ontinue"utton#lick #4 #reate0ser3izard.#reated0ser %4 #reate0ser3izard.(nit #hapter518F$esson524 ;;. 3hich o+ the +ollowin, 3e-.con+i , se,ments correctl1 reIuires that all users -e authenticated usin, a 3indows user account? A4 Cauthentication modeLK3indowsK UD CauthorizationD Cden1 usersLKMK UD CUauthorizationD "4 Cauthentication modeLK3indowsK UD CauthorizationD Callow usersLKMK UD CUauthorizationD #4 Cauthentication modeLK3indowsK UD CauthorizationD Cden1 usersLK?K UD CUauthorizationD %4 Cauthentication modeLK3indowsK UD CauthorizationD Callow usersLKMK UD CUauthorizationD ;<. "1 de+ault> how does A)*.NET track which users have success+ull1 authenticated usin, +orms authentication? A4 (t provides an authentication token in the +orm o+ a cookie. "4 (t provides an authentication token in the 0 (. #4 (t provides an authentication token in the +orm o+ a cookie i+ the clientQs -rowser proves that it can store and return a cookie. Etherwise> it stores the authentication token in the 0 (. %4 (t provides an authentication token in the +orm o+ a cookie i+ the clientQs -rowser t1pe supports cookies. Etherwise> it stores the authentication token in the 0 (.

;?. Biven the +ollowin, 3e-.con+i, +ile> what permissions do users have to the !arketin, +older? Ccon+i,urationD Cs1stem.we-D Cauthentication modeLK3indowsK UD CauthorizationD Cden1 usersLK?K UD CUauthorizationD CUs1stem.we-D Clocation pathLK!arketin,KD Cs1stem.we-D CauthorizationD Callow rolesLKFA" (RA!]!arketin,K UD Cden1 usersLKMK UD CUauthorizationD CUs1stem.we-D CUlocationD CUcon+i,urationD A4 Authenticated users and mem-ers o+ the FA" (RA!]!arketin, ,roup have access. All other users are denied access. "4 !em-ers o+ the FA" (RA!]!arketin, ,roup have access. All other users are denied access. #4 All users> authenticated and unauthenticated> have access. %4 All users are denied access. <A. =ou are con+i,urin, NTF) +ile permissions +or a 3e- application with the +ollowin, 3e-.con+i, +ile& Ccon+i,urationD Cs1stem.we-D Cauthentication modeLK3indowsK UD CauthorizationD Cden1 usersLK?K UD CUauthorizationD CUs1stem.we-D Clocation pathLK!arketin,KD Cs1stem.we-D CauthorizationD Callow rolesLKFA" (RA!]!arketin,K UD Cden1 usersLKMK UD CUauthorizationD CUs1stem.we-D

CUlocationD CUcon+i,urationD For the !arketin, +older> 1ou remove all +ile permissions> and then ,rant read access to the A" (RA!]Pohn and FA" (RA!])am user accounts. Pohn is a mem-er o+ the FA" (RA!] %omain 0sers and FA" (RA!]!arketin, ,roups. )am is onl1 a mem-er o+ the FA" (RA!]%omain 0sers ,roup. 3hich o+ the +ollowin, users can access 3e- +orms located in the !arketin, +older? A4 0nauthenticated users "4 Authenticated users #4 !em-ers o+ the FA" (RA!]%omain 0sers ,roup %4 FA" (RA!]Pohn E4 FA" (RA!])am #hapter519F$esson514 <1. =ou need to create a mo-ile 3e- site application. 3hat steps should 1ou take? F#hoose all that appl14. A4 #reate a standard A)*.NET 3e- site. "4 0se standard A)*.NET 3e- +orms. #han,e these +orms to inherit +rom )1stem.3e-. 0(.!o-ile#ontrols. !o-ile*a,e. #4 Add an T e,ister directive to 1our pa,e to re,ister the )1stem.3e-.!o-ile assem-l1. %4 Add one or more Cmo-ile&FormD controls to 1our pa,e. <'. =ou have a mo-ile $a-el control on 1our mo-ile 3e- +orm. =ou want the te@t to -e di++erent -ased on whether the -rowser is (nternet E@plorer or a mo-ile device. Gow can 1ou per+orm this task? F#hoose two answers.4 A4 (n 1our code> add a test +or eIuest."rowser.(s!o-ile%evice> and then set the Te@t propert1 accordin,l1. "4 (n 1our code> call the (s%evice method on the mo-ile 3e- +orm and pass the %evice. !o-ile enumeration value> and then set the Te@t propert1 accordin,l1. #4 ead the 0serA,ent propert1 on the eIuest o-.ect> and i+ the 0serA,ent is eIual to mo-ile> set

the Te@t propert1 accordin,l1. %4 )et the de+ault Te@t value> and then de+i ne a mo-ile device in the Applied%evice5 Filters> and use this to set the Te@t propert1 usin, the *ropert1Everrides propert1 o+ the mo-ile $a-el control. <2. =ou created a mo-ile 3e- site that appears to -e workin, properl1 +or 1our users. Poe .ust purchased a new state5o+5the5art mo-ile device. 3hen he attempted to view a #alendar control on 1our 3esite> the control attempted to render a month view> -ut PoeQs mo-ile device screen wasnQt -i, enou,h to displa1 the calendar. =ou decide to create a new .-rowser +i le that represents PoeQs mo-ile device and the settin,s will cause the calendar to render appropriatel1. Gow can 1ou ,et the runtime to reco,nize the new .-rowser +ile settin,s? A4 Add the name o+ the .-rowser +ile to the !achine.con+i, +ile in the "rowsers element. "4 Add the .-rowser +ile name to the 3e-.con+i, +ile +or 1our 3e- site in the "rowsers element. #4 un the aspnet/re,-rowsers command5line tool in the .NET #ommand *rompt window usin, the Wi switch. %4 un the aspnet/re,iis command5line tool in the .NET #ommand *rompt window usin, the W re,ister-rowsers switch. #hapter51:F$esson514 <8. =ou need to add a re,istr1 entr1 to make 1our application +unction. (n which phase o+ the 3e)etup *ro.ect should 1ou add the re,istr1 entr1? A4 (nstall "4 #ommit #4 oll-ack %4 0ninstall <9. =ou need to make a chan,e to an operatin, s1stemWrelated re,istr1 entr1 to make 1our application +unction. =ou want to ensure 1ou remove this chan,e i+ setup is cancelled or the application is removed +rom the computer. (n which phases should 1ou undo 1our re,istr1 modi+ication? F#hoose all that appl1.4

A4 (nstall "4 #ommit #4 oll-ack %4 0ninstall <:. 3hich o+ the +ollowin, deplo1ment tools ena-le multiple developers to work on a site simultaneousl1 while detectin, potential versionin, con+l icts? A4 )etup *ro.ect "4 3e- )etup *ro.ect #4 #op1 3e- tool %4 *u-lish 3e- )ite tool <;. 3hich o+ the +ollowin, deplo1ment tools has the potential to improve responsiveness o+ the 3esite to end users? A4 )etup *ro.ect "4 3e- )etup *ro.ect #4 #op1 3e- tool %4 *u-lish 3e- )ite tool #hapter51:F$esson5'4 <<. =ou are creatin, an A)*.NET 3e- pa,e that displa1s a list o+ customers ,enerated -1 a data-ase Iuer1. The user can +ilter the list so that onl1 customers within a speci+ic state are displa1ed. =ou want to ma@imize the per+ormance o+ 1our 3eapplication -1 usin, pa,e output cachin,. =ou want to ensure users can +i lter -1 state> -ut 1ou are not concerned a-out displa1in, updates to the list o+ customers -ecause the customer list doesnQt chan,e ver1 +reIuentl1. 3hich declarative T Eutput #ache attri-ute should 1ou con+i,ure? A4 6ar1"1*aram "4 6ar1"1Geader #4 )Il%ependenc1 %4 6ar1"1#ustom <?. =ou need to pro,rammaticall1 con+i,ure pa,e output cachin,. 3hich o-.ect would 1ou use? A4 eIuest "4 esponse #4 Application %4 )erver ?A. =ou want to cache an o-.ect -ut have it automaticall1 e@pire in 1A minutes. Gow can 1ou do

this? F#hoose all that appl1.4 A4 %irectl1 de+ine the #ache item. "4 #all #ache.Bet. #4 #all #ache.(nsert. %4 #all #ache.Add. ?1. 3hich tool can 1ou use to create per+ormance counters? F#hoose all that appl1.4 A4 An GTT* header "4 A +ile #4 A time span %4 A re,istr1 ke1 E4 Another o-.ect in the #ache

#hapter51 and ' 1. To separate 1our server5side code +rom 1our client5side la1out code in a 3e- pa,e> what pro,rammin, model should 1ou implement? A. )in,le5+ile model ". #ode5-ehind model #. (nline model %. #lient5server model Ans& " '. 3hich t1pe o+ 3e-site is use+ul when 1ou want to connect to 1our site via FT* to mana,e 1our + les on a remote server? A. The File5"ased ". The FT*5"ased #. The GTT*5"ased %. The emote5"ased Ans& " 2. /////////////////ph1sicall1 separates 1our user inter+ace la1out markup and 1our server5side code into two distinct +iles. A. The code5-ehind pro,rammin, model ". The sin,le +ile pro,rammin, model #. The FT* pro,rammin, model %. The GTT* pro,rammin, model Ans& A 8. 3hich con+i,uration +ile to make a con+ ,uration settin, chan,e that will -e ,lo-al to all 3eand 3indows applications on the current computer.? A. Blo-al.asa@ ". 3e-.con+ , #. !achine.con+ , %. Blo-al.asa Ans& # 9. 3hich con+i,uration +ile to make a con+ ,uration settin, chan,e that will a++ect onl1 the current 3e- application? A. FT*.con+i, ". 3e-.con+ , #. !achine.con+ ,

%. Blo-al.asa@ Ans& " :. File e@tension used +or A)*.NET +iles. A. .3e". .A)* #. .A)*O %. None o+ the a-ove Ans& # #hapter52 1. 3hich propert1 must -e set on a validator control +or the validation to work? A. #ontrolTo6alidate ". #ontrolTo"ind #. 6alidate#ontrol %. 6alidate Ans& A '. 3hich validation control used to displa1 all the validation error messa,es in one location a+ter the user has tri,,ered pa,e5level validation -1 clickin, a su-mit -utton? A. #ontrolTo6alidate ". #ontrolTo"ind #. 6alidate#ontrol %. 6alidate)ummar1 Ans& % 2. 3hat is used to validate comple@ strin, patterns like an e5mail address? A. E@tended e@pressions ". "asic e@pressions #. e,ular e@pressions %. (rre,ular e@pressions Ans& # 8. 3hich control per+orms validation -1 usin, comparison operators such as ,reater than and less than to compare the data entered -1 a user? A. #ontrolTo6alidate ". #ontrolTo"ind #. #ompare6alidator %. 6alidate)ummar1 Ans& # 9. 3h1 use the #ustom6alidator #ontrol? A. Allows 1ou to provide 1our custom server5side

code to per+orm input validation ". Allows 1ou to provide 1our custom client5side and server5side code to per+orm input validation #. Allows 1ou to provide 1our client5side code to per+orm input validation Ans& " #hapter58 1. Gow to add #ookie in -rowser !achine? A. esponse.#ookies.AddFJlast6isitK4.6alue L %ateTime.Now.To)trin, esponse.#ookies.AddFJlast6isitK4.E@pires L %ateTime.Now.Add%a1sF14 esponse.#ookies.AddFJlast6isitK4.*ath L JU!1ApplicationK ". esponse.#ookiesFJlast6isitK4.6alue L %ateTime.Now.To)trin, esponse.#ookiesFJlast6isitK4.E@pires L %ateTime.Now.Add%a1sF14 esponse.#ookiesFJlast6isitK4.*ath L JU!1ApplicationK Ans& " '. Gow to read Iuer1stin, 6alue? A. E-.ect.Quer1strin,FJvaria-leNameK4 ". esponse.Quer1strin,FJvaria-leNameK4 #. eIuest.Quer1strin,FJvaria-leNameK4 %. Quer1strin,FJvaria-leNameK4 Ans& # 2. 3hich t1pe o+ state mana,ement should 1ou use to store userQs Name and *assword? A. #lient5side state mana,ement ". -. )erver5side state mana,ement Ans& A 8. 3hich t1pe o+ client5side state mana,ement meets 1our reIuirements and is the simplest to implement? A. . 6iew state ". #ontrol state #. Gidden +elds %. #ookies E. Quer1 strin,s Ans& A 9. 3hich statement use to disa-le the session?

A. Ccon+i,urationD Cs1stem.we-D Csession)tate %isa-leLK=esKUD CUs1stem.we-D CUcon+i,urationD ". Ccon+i,urationD Cs1stem.we-D Csession)tate modeLK%isa-leKUD CUs1stem.we-D CUcon+i,urationD #. Ccon+i,urationD Cs1stem.we-D Csession)tate modeLKo++KUD CUs1stem.we-D CUcon+i,urationD Ans& # #hapter59 1. 3hich pa,e allow 1ou to centralize the common +unctionalit1 o+ 1our pa,es so that 1ou can make updates in .ust one place.? A. #ontent*a,e ". 3e- Form #. !aster*a,e Ans& # '. The master pa,es contain which directive? A. T !aster directive ". T#ontent %irective #. T*a,e %. T3eAns& A 2. 3hich control is reIuired inside a master pa,e? A. #ontent ". #ontent*laceGolder #. #ontent*lace Ans& " 8. 3e need to d1namicall1 chan,e the master pa,e o+ a content pa,e. (n which pa,e event should 1ou implement the d1namic chan,in,? A. *a,e/$oad ". *a,e/ ender #. *a,e/*re ender %. *a,e/*re(nit

Ans& A 9. Need to allow users to choose their own themes. (n which pa,e event should speci+1 the userselected theme? A. *a,e/$oad ". *a,e/ ender #. *a,e/*re ender %. *a,e/*re(nit Ans& % #hapter5: 1. 3hich control is reIuired on all pa,es that work with the APAO e@tensions +or A)*.NET? A. 0pdate*anel ". )cript!ana,er #. Timer Ans& " '. 3hich control allows 1ou to de+ne an area within 1our pa,e that can *ost"ack to the server and receive updates independent o+ the rest o+ the pa,e? A. 0pdate*anel ". )cript!ana,er #. Timer Ans& A 2. 3hich control is used to provide notice to the user that the pa,e has initiated a call -ack to the server? A. 0pdate*ro,ress ". 0pdate#ontrol #. Timer Ans& A 8. The /////////////class is used to re,ister client script d1namicall1 +rom server side code. An instance o+ this class is accessi-le +rom the *a,e.#lient)cript propert1. A. #lient)cript!ana,er ". )cript!ana,er Ans& A 9. A)*.NET includes a set o+ APAO e@tension controls. These include the 0pdate*anel control> the 0pdate*ro,ress control> and the Timer control A. True ". False Ans& A

#hapter5; 1. 3hich E-.ect is a memor15-ased relational representation o+ data and the primar1 disconnected data o-.ect. A. %ataTa-le ". %ata)et #. %ata %. A%E Ans& " '. The %ata)et contains a collection o+ /////////// and ///////////////o-.ects> A. %ataTa-le ". %ata elation #. %ata)et %. %ataE-.ect Ans& A H " 2. =ou want to save a %ata)et o-.ect to an O!$ + le> -ut 1ou are concerned that 1ou mi,ht lose the ori,inal version o+ the %ata ow o-.ect. Gow should 1ou save the %ata)et o-.ect? A. )ave it as a O!$ ". )ave it as a %ata-ase #. )ave it as a %i++,ram Ans& # 8. 3e are workin, with a %ata)et and want to -e a-le to displa1 data> sorted di++erent wa1s. Gow do 1ou do so? A. 0se the )ort method on the %ataTa-le o-.ect. ". 0se the %ata)et o-.ectQs )ort method. #. 0se a %ata6iew o-.ect +or each sort. %. #reate a %ataTa-le +or each sort> usin, the %ataTa-le o-.ectQs #op1 method> and then )ort the result Ans& # 9. 3hat are the two +undamental o-.ects in A%E.NET? A. %ata eader ". %ata)et #.%ataTa-le %. %ataAdapter Ans& A H " :. 3hich namespaces are reIuired to ena-le the use

o+ data-ases in A)*.NET pa,es? A. )1stem.%ata ". )1stem.%ata.)Il#lient #. )1stem.)Il#lient %. )1stem.A%E Ans& A H " ;. 3hich properties are used to -ind a %ataBrid6iew control? A. %ata!em-er ". %ata6alue #. %ata)ource %. %ata%ispla1 Ans& A H # <. 3hat propert1 must -e set and what method must -e called in 1our code to -ind the data +rom some data source to the epeater control? A. %ata!em-er ". %ata"ind #. %ata)ource %. %ata%ispla1 Ans& " H # #hapter51A 1. 3hich control provides an eas1 wa1 to com-ine several controls into a sin,le unit o+ +unction alit1 that can -e dra,,ed onto multiple 3e- pa,es? A. )erver#ontrol ". 0ser#ontrol #. #ustom #ontrol %. 6alidation #ontrol Ans& " '. 3hat is the easiest wa1 to ,roup several Te@t"o@ and $a-el controls that can -e dra,,ed onto a 3epa,e as a unit without writin, much code? A. )erver#ontrol ". 0ser#ontrol #. #ustom #ontrol %. 6alidation #ontrol Ans& " 2. A ////////////////3e- control is a control that inherits +rom a 3e-)erver control. A. )erver#ontrol ". 0ser#ontrol

#. #ustom #ontrol %. 6alidation #ontrol Ans& # 8. 3hich control is a custom 3e- control that contains other controls? A. #omposite #ontrol ". 0ser#ontrol #. #ustom #ontrol %. 6alidation #ontrol Ans& A 9. 3e wish to create a new> custom 3e- server control that does not rel1 on an1 one e@istin, A)*.NET control. From what class should 1ou inherit? A. #reate #omposite #ontrol ". (nherit +rom the 3e-control #lass #. #ustom #ontrol Ans& " #hapter511 1. Gow to read Application )ettin,s? A. $a-el1.Te@t L 3e-#on+i,uration!ana,er.App FJ!1App)ettin,K4 ". $a-el1.Te@t L 3e-#on+i,uration.App)ettin,sFJ!1App)ettin,K4 #. $a-el1.Te@t L 3e-#on+i,uration!ana,er.App)ettin,sFJ!1App)ett in,K4 %. $a-el1.Te@t L 3e-#on+i,uration!ana,er.#onnectin,)ettin,sFJ!1 App)ettin,K4 Ans& # '. 3hich o+ the +ollowin, code use to create a New #on+i,uration File? A. %im con+i, As #on+i,uration L 3e-#on+i,uration!ana,er.Epen3e-#on+i,urationFJ U!1AppK4 con+i,.)aveAsFJc&]!1App.we-.con+i,K> #on+i,uration)ave!ode.Full> True4 ". %im con+i, As #on+i,uration L 3e-#on+i,uration!ana,erFJU!1AppK4 con+i,.)aveAsFJc&]!1App.we-.con+i,K> #on+i,uration)ave!ode.Full> True4

Ans& A 2. 3hat t1pe does 3e-#on^ ,uration!ana,er.,et)ection return? A. 3e-#on^ ,uration!ana,er.,et)ection returns an t1pe ". 3e-#on^ ,uration!ana,er.,et)ection returns an o-.ect t1pe #. 3e-#on^ ,uration!ana,er.,et)ection returns an #lass Ans& " 8. =ou catch an unhandled e@ception in a *a,e/Error handler. Gow can 1ou access the last error? A. )erver.Bet$astError ". )erver.#learError #. eIuest.Bet$astError %. Application.Bet$astError Ans& A 9. 3hich o+ the +ollowin, can 1ou use to catch unhandled e@ceptions in an application? F#hoose all that appl1.4 A. esponse/Error ". *a,e/Error #. Application/Error %. )erver/Error Ans& " H # #hapter512 1. (n which +older should 1ou store ,lo-al resource +iles? A. "in/,lo-al esources +older. ". ,lo-al esources +older. #. App/,lo-al esources +older. Ans& # '. (n which +older should 1ou store local resource + les? A. "in/,lo-al esources +older. ". App/$ocal esources. #. App/,lo-al esources +older. Ans& " 2. 3e need to create a 3e- pa,e that is availa-le in -oth the de+ault lan,ua,e o+ En,lish and in Berman. 3hich o+ the +ollowin, resource + les

should 1ou create? F#hoose all that appl1.4 A. App/$ocal esourcesU*a,e.asp@.res@.de ". App/$ocal esourcesU*a,e.asp@.res@ #. App/$ocal esourcesU*a,e.asp@.de.res@ %. App/$ocal esourcesU*a,e.asp@.en.res@ Ans& " H # 8. we add a ,lo-al resource with the name $o,in -1 usin, 6isual )tudio. Gow can 1ou access that ,lo-al resource pro,rammaticall1? A. esources. esource.$o,in ". esources. esourceFJ$o,inK4 #. esourcesFJ$o,inK4 %. esources.$o,in Ans& A #hapter518 1. 3hich !ethod to save a userQs pro+ le to a data-ase? A. *ro+ile.)ave method ". *ro+ile.Add method #. *ro+ile.(nsert method Ans& A '. //////////////// to store and retrieve user pro+ le in+or5 mation to a )Q$ )erver E@press data-ase called A)*NET%".md+ A. *ro+ile ". )Il%ataAdapter #. )Il*ro+i le*rovider Ans& # 2. 3hich o+ the +ollowin, controls provides a link +or unauthenticated users to lo, on? A. $o,in ". $o,in6iew #. $o,in)tatus %. $o,inName Ans& # 8. =ou are creatin, a 3e- +orm that ena-les users to lo, in to 1our 3e- site. 3hich o+ the +ollowin, A)*.NET controls should 1ou add to the pa,e? F#hoose two answers.4 A. $o,in

". #reate0ser3izard #. $o,inName %. *assword ecover1 Ans& A H % #hapter519 1. 3hat is a primar1 di++erence -etween the standard validator controls and the mo-ile validator controls? A. The mo-ile validator controls donQt provide client5side validation. ". The mo-ile validator controls provide client5side validation. Ans& A 2. 3hat can 1ou do to ensure that session state is maintained when mo-ile devices that donQt accept cookies are accessin, 1our mo-ile 3e- site? A. 1ou should ena-le cookieless sessions in the 3e-.con+i , +ile ". 1ou should ena-le sessions in the 3e-.con+i , +ile #. 1ou should disa-le cookieless sessions in the 3e-.con+i , +ile Ans& A #hapter51: 1. 3hat launch condition does a 3e- )etup *ro.ect include -1 de+ault? A. "1 de+ault> a 3e- )etup *ro.ect do not checks +or an (() version later than 8 ". "1 de+ault> a 3e- )etup *ro.ect checks +or an (() version later than 1 #. "1 de+ault> a 3e- )etup *ro.ect checks +or an (() version later than 8 Ans& # '. 3hat are the +our phases o+ a 3e- )etup *ro.ect deplo1ment? A. (nstall ". #ommit #. oll-ack %. All o+ them Ans& %

You might also like