dotnet questions 1
TRANSCRIPT
-
7/27/2019 DotNet Questions 1
1/22
1) SOAP is a light weight protocol which operates on top of HTTP.
2) The common Language Specification is a subset of the Common Tpe Sstem !
True") The #ot$et %ramewor& Class Librar is accessible onl to C' applications !
%alse
() *L support is integrate+ in the #ot$et platform, True-) hich of the following statement is false/ ! 0 is false
a. One can buil+ +otnet applications without haing S.$et installe+3
proi+e+ the compiler an+ the runtime is aailable on the machineb. To buil+ a #ot$et application it is man+ator to hae S.$et installe+
4) The concept of single signon is part of the #Otnet Serices.
5) hich of the foll is true w.r.t. a in+ows forms base+ client serer application/ !0 is true
a. 6t is man+ator for the client process an+ the serer process to e7ecute on
+ifferent machines
b. The client process an+ serer process can e7ecute on the same machinec. 6t is man+ator to e7ecute both processes on same machine
8) 0.$et is bac&war+ compatible with 0/ !True9) The #ot$et class librar is store+ in the form of ! A :6L)
a. 6L
b. *eta+atac. *achine co+e
1;) hich of the fol is true w.r.t a meta+ata for a #otnet application/ ,A is true
a. *eta+ata is man+ator for the e7ecution of +otnet application
b. *eta+ata is optionalc. *eta+ata for +otnet is generate+ from 6L ! C is true
11) The function on ilasm.e7e is toa. Conert machine co+e to 6L co+eb. Conert High leel co+e to 6L co+e
c. Conert 6L co+e to machine co+e
12) CL< intreprets the P= co+e generate+ b a +otnet compiler/ !%alse
1") ebforms3 informs an+ ebserices are three tpes of applications that can be
+eelope+ in a .net enironment.
1() 6n .net ,,,,,,,,, i+ use+ to conert a alue tpe into an ob>ect ! 0 :0o7ing)a. Seriali?ation
b. 0o7ing
c.
-
7/27/2019 DotNet Questions 1
2/22
14) The root of the +otnet baseclass namespace is Sstem.
15) A webserice client tal&s to a webserice proi+er using , 0
a. %TPb. SOAP
c. HTTP
18) Can a 0.$et application compile+ un+er .$et for in+ows3 be e7ecute+ un+er a
0 runtime installe+ on another in+ows base+ machine , $o
19) hich of the foll is true w.r.t. natie image ! A is truea. $atie images are properitar to the OS an+ the shu+ be create+ onl in
the +eploment si+e
b. $6 are properitar to the OS but still the can be create+ at the +e si+e
an+ once create+ the can be copie+ to the +eploment si+ec. $6 are not properitar to the OS an+ the can be create+ at the
+eelopment si+e an+ once create+ can be copie+ to the +epl si+e.
2;) hich of the foll is true w.r.t compiling an 6L co+e in .net to natie co+e/ , #
a. One can use stan+ar+ >itting to generate optimi?e+ natie co+e from 6Lb. One can use =conom @itting to conert the 6L to natie co+e
c. One can +o install time natie co+e generation from 6L which re+uces the
runtime+. All are true
21) which of these is not e7tension in .net asp73asa73asl73asc7 :ans. .asl7)
22) ect3+ataset3connection.... :ans. #ataSet)
2") A+o.net is +erie+ from com true or false///////////2() application state is preserer across webgar+en or web farm or both//////////
2-) which is a &ewor+ in .net as3foreach3chec&e+3all of aboe :ans. all of the aboe)
24) which ob>ect is use+ for sharing +ata amongst all users of an applicationapplication3session3comman+3.. :ans. Application)
25) eents in C' are base+ on which mo+el +elegate mo+el3eent mo+el etc... :ans.
#elegate mo+el)28) when u want to re+irect to a new page an+ also be able to access the +ata of the
preious page3 use Serer.Transfer:)
29) to mo+if a string without creating a new string ob>ect use String0uil+er:) class
";) 0o7ing an+ Bnbo7ing are conerting from alue tpe to reference tpe an+ iceersa3 strong tpe casting3 ob>ect conersion :ans. all)
"1) chec&e+ an+ unchec&e+ &ewor+s are use+ in C' for boun+s chec&ing//////////
"2) which of the following is +issconnecte+ in nature +ataset3+atarea+er3Comman+:ans. #ataSet)
"") to +ispla +ate in nnn,nn,nnnn3 Bse ;,9DE"F3;,9DE2F3;,9DE(F
"() Cases cannot fall through. use goto or brea&. empt cases can fall through"-) to e7tract a alue from .asp7 in G.asp73 Bse
-
7/27/2019 DotNet Questions 1
3/22
"8) #ataA+apter internall ma&es use of KKKKK to retreie +ata :ans. Comman+
ob>ect)
"9) SelectComman+ propert of #ataA+apter is initialse+ on e7ecution of whichstatement :ans. +a.%ill:))
(;) Sstem.#ata contains all #ataSet3#ataTable3#ata
-
7/27/2019 DotNet Questions 1
4/22
42) The #atatables that ma&e up the +ata in a +ataset
a. Can inclu+e man heterogeneous +atabases sources
b. Can be from multiple +atabases bases which are homogeneousc. Shoul+ be from Single +atabase source
+. $one of the aboe
4") 6f we are not returning an recor+s from the +atabase which metho+ is use+ , Aa. =7ecute$onIuer:)
b. =7ecute
-
7/27/2019 DotNet Questions 1
5/22
following co+e bloc&s shoul+ ou choose to call the #isplaPro+uct$ames:)
metho+/
a. Rscript languageJC'J runatJsererJ
-
7/27/2019 DotNet Questions 1
6/22
a. *oe the co+e to the Pre
-
7/27/2019 DotNet Questions 1
7/22
Rerror statusCo+eJ(;"J re+irectJ%orbi++en.asp7J N
Rerror statusCo+eJallJ re+irectJMeneral=rror.asp7J N
RNcustom=rrors
54) Gou hae written a isual C' .$=T metho+ that opens a +atabase connectionusing a SlConnection ob>ect3 which retriees some information from the
+atabase an+ then closes the connection. The information is retriee+ using a
store+ proce+ure that might not alwas be aailable because of the maintenancesche+ules. Gou hae wrappe+ the co+e to call the store+ proce+ure in a tr,catch,
finall bloc&. Gou use two catch bloc&sVone to catch the e7ceptions of tpe
Sl=7ception an+ the secon+ to catch the e7ceptions of tpe =7ception. hich of
the following places shoul+ ou choose for closing the SlConnection ob>ect/a. 6nsi+e the tr bloc&3 before the first catch bloc&
b. 6nsi+e the catch bloc& that catches Sl=7ception ob>ects
c. 6nsi+e the catch bloc& that catches =7ception ob>ects
+. 6nsi+e the finall bloc&55) sGour ASP.$=T application inclu+es a eb page name+ =rrors.htm that is
+isplae+ in response to an error. This page is configure+ using the followingco+e in the web.config file
Rcustom=rrors mo+eJOffJ +efault
-
7/27/2019 DotNet Questions 1
8/22
reports ia the application3 the focus moes to the first control on the reporting
form. This ma&es it +ifficult for users to e+it their e7pense reports.
hat is the easiest wa to maintain focus across postbac& operations in this
application/
a. Store the name of the current control in session state when the page isposte+ bac&3 an+ use this name to set the focus when the page is re,
create+.
b. Store the name of the current control in iew state when the page is poste+bac&3 an+ use this name to set the focus when the page is re,create+.
c. rite client,si+e co+e that stores the focus control in a hi++en fiel+ an+
retriees this information when the page is re,create+.
+. Set the Smart$aigation attribute of the Page +irectie to true.8;) Gour ASP.$=T eb application uses session state to trac& usernames an+ other
user,specific +etails. Gour eb application contains a eb page that +isplas a
greeting to the userVJelcome RBser$ameJVan+ the pro+uct catalog from a
SIL Serer +atabase. The pro+uct catalog is +isplae+ in a #ataMri+ control thatis populate+ at eer page loa+. hich of the following options shoul+ ou use in
this application to ma7imi?e performance/ :Select two.)1. #isable iew state for the page.
2. #isable session state for the page.
". *a&e the session state rea+,onl for the page.
(. Store the session state in SIL Serer.a. 1 an+ 2
b. 1 an+ "
c. 1 an+ (+. 2 an+ "
81) Gour ASP.$=T application stores sensitie +ata in the session state. Gou nee+ to
maintain the session state een if the eb serer crashes an+ nee+s to berestarte+. hich mo+e attribute shoul+ ou use to configure the RsessionState
element for this application/
a. mo+eJ6nprocJ
b. mo+eJStateSererJc. mo+eJSlSererJ
+. mo+eJOffJ
82) Gou are +eeloping an online boo&store application in isual C' .$=T. Gourapplication nee+s to store the most recent boo& iewe+ b the user an+ show the
recentl iewe+ boo&Us +etails in the lower part of the eb pages wheneer the
user accesses the eb site. Gou +o not want to use serer,si+e resources to storethe boo& 6S0$. hich of the following state,management techniues will help
ou accomplish this/ , C
a. Application state
8
-
7/27/2019 DotNet Questions 1
9/22
b. Session state
c. iew state
+. Cache ob>ect8") How +o 6 get an+ set =nironment ariables using C'/ , A
a. Bse the Sstem.=nironment class.
Specificall the Met=nironmentariable an+ Set=nironmentariablemetho+s.
b. Bse =nironmentariableTarget enumeration &ewor+c. Bse =nironment &ewor+ followe+ b the ariable name in Iuotes
+. 6t is not possible using C'
8() 6 hae written the following co+e
priate oi+ emploeeTerminate : string =mp6+)
E
NN... search for emploee
if : +ata
-
7/27/2019 DotNet Questions 1
10/22
E
NN... search for emploee
if : +ata
-
7/27/2019 DotNet Questions 1
11/22
b. in+ows
c. %orms
+. passport94) How to configure the *a7 reuest length for an HTTP reuest in ASP.$et/
a. Rhttp
-
7/27/2019 DotNet Questions 1
12/22
+. Create an instance of the class Sstem.$et.ebClient. Set the hea+er
properties an+ use the metho+ Post#ata:) to post a reuest.
1;;) How to create controls in ertical or hori?ontal or all on one line3 or in an
format ou specifa. Bse ect from the chil+ win+ow to access an control in theperent win+ow
b. Bse Parent ob>ect from the chil+ win+ow to access an control in the
perent win+ow
c. Bse Chil+ ob>ect from the chil+ win+ow to access an control in the perentwin+ow
+. Bse Mran+Parent ob>ect from the chil+ win+ow to access an control inthe perent win+ow
1;2) hich win+ow +oes not allow user to iew the HTTP source co+e of a
ren+ere+ page/a. +ispla the page using win+ow.show*o+al#ialog:) function.
b. +ispla the page using win+ow.Open:) function.
c. +ispla the page using win+ow.show*o+alin+ow:) function.
+. +ispla the page using win+ow.open*o+al#ialog:) function.1;") hich of the following is $OT true for *aster Pages in .$et 2.; /
a. At least one of the pages in the ASP.$et application must inherit from the
*aster Pageb. *asterPages hae the +efault e7tension of .master
c. An ASP.$et application can hae an number of *asterPages
+. A *asterPage can hae multiple content placehol+ers1;() How +o ou turn off coo&ies for one page in our site / , A
a. Coo&ie.#iscar+
b. Session.Aban+on
c. Session.Clear+. 6t is not possible
1;-) Gou are clic&ing an up+ate button to mo+if +ata from a #atagri+.
Howeer3 the +ata +oes not get up+ate+ een though the Co+e 0ehin+ an+ Store+Proce+ure are correct. The #ata is reloa+e+ from the #atabase +uring Page Loa+
eent an+ boun+ to the #atagri+. THere are no error messages being +isplae+
either. hat can be the most probable reason behin+ this /a. There is no co+e gien for 6sPostbac& eent.
b. The iewstate is not enable+ for the #atagri+
c. The iewstate is not enable+ for the Page
12
-
7/27/2019 DotNet Questions 1
13/22
+. The account un+er which the ASP.$et is running +oes not hae proper
priileges on the #atabase to run the #atabase.
1;4) hat ASP.$=T ob>ect is use+ to get information about the web serers /a. Serer
b. Application
c. ect to ensure thatonl one process accesses a ariable at a time/
a. Loc&:) an+ BnLoc&:)
b. Snchroni?e:)
c. Loc&:)+. Asnchroi?e:)
111) hen an ASP.$=T serer control is a++e+ to a eb %orm3 isual
Stu+io .$=T a++s one item to the class for the form. hat item is a++e+/a. A +efault class that inherits from the controlWs base class
b. A +efault eent han+ler for the clic& eent
c. A protecte+ class member for the control+. The eent registration
112) After capturing the Selecte+6n+e7Change+ eent for a List0o7 control3
ou fin+ that the eent han+ler +oesnWt e7ecute. hat coul+ the problem be/
a. The AutomaticPost0ac& attribute is set to %alse
1"
-
7/27/2019 DotNet Questions 1
14/22
b. The Auto=entireup attribute is set to %alse
c. The co+ebehin+ mo+ule is not properl compile+
+. The List0o7 must be +efine+ ith=ents11") After buil+ing a custom control3 ou test it b a++ing an ASP.$=T web
application to the solution. Gou a++ a correct R
-
7/27/2019 DotNet Questions 1
15/22
") Pt Sstem Total Processor Time
()
-
7/27/2019 DotNet Questions 1
16/22
a. Supports CO* interop
b. Proi+es platform ino&e serices
c. Proi+es marshalling serices+. All
125) Setting the StartProgram propert to JComSpecJ for
*s
-
7/27/2019 DotNet Questions 1
17/22
c. Create a custom application for ma&ing the registr entries while installing
the application.
+. =7ecute the registr file from the comman+ prompt.1"() ill 6 be able to pass the custom parameters to the msie7ec comman+.
a. T
-
7/27/2019 DotNet Questions 1
18/22
a. *L,
-
7/27/2019 DotNet Questions 1
19/22
a. *L uses a #T# to +escribe the +ata
b. *L uses a +escription no+e to +escribe +ata
c. *L uses SL to +escribe +ata+. All of the aboe
1-;) hat is the correct name for a resource file with images for the =nglish
culture3in the Bnite+ States subculture/a. images.BS,en.resources
b. images.en,BS.resources
c. resources.images.en,BS+. images.en,BS.+ll
1-1) hich comman+ woul+ ou use to list the e7isting files in the natie
image cache/
a. $gen.e7e Nshowb. $gen.e7e Nlist
c. $gen.e7e Ncache
+. $gen.e7e Ncache
1-2) Gour application is calle+ AccountingOne.e7e. hat must the name of thesatellite assemblies be/
a. AccountingOne.resources.+llb. Accountingone.resources.+ll
c. Accounting.
-
7/27/2019 DotNet Questions 1
20/22
a. public static oi+ *etho+A:)
b. priate static *etho+A:)
c. public oi+ *etho+A:)+. public static *etho+A:)
1-8) %rom which base class all other classes are +erie+ ! Sstem.Ob>ect
1-9) rea+7ml is use+ b,,,,,,,,,,,,,,,,,,,,,#ataset
14;) ith the help of which propert is it possible to chec& whether an .ASP
page is poste+ bac& to the serer/a. Autopostbac&
b. 6s$ewSession
c. 6sAbstract
+. 6sPostbac&141) hich of these can be use+ in forms/ 1 [ 2
a. #atalist
b. #atagri+
c. #atatable
142) ThrowCatch:e7ception)
Catch:ioe7ception)
hat is wrong in this ! An e7ception cannot be there as an argumentMeneral e7ception will be calle+ first
14") hen is %i7e+ use+/
14() what is multi casting
14-) which is use+ for file relate+ operation ! Sstem.6O
144) which of the foll will be use+ to bin+ the te7t propert of a te7tbo7
\t7t0o7W to \empi+W col of the emploee table in +atabase !t7t0o7.#ata0in+ings.A++:]Te7t^3 m#ataset1.tables;D3 ]empi+^)Q
145) which e7ception is raise+ when u tr to up+ate the +b with the alues of
+ataset/ ! +b concurrenc e7ception148) ASP.$et is faourable because
a. Co+e behin+
b. Compile+
c. =as to+. All
149) hich one will be use+ when u nee+ to share +ata across all the users/a. Application
b. Session
c.15;) what is +efault scope of metho+ insi+e an interface , public
151) +atasets can be merge+ onl if the
a. hae same table names
b. same columns
2;
-
7/27/2019 DotNet Questions 1
21/22
c. same primar &e
+. all
152) when will u use select comman+ ! %ill :#oubt)15") To +ispla +ate in nnn,nn,nnnn
a. Bse ;,9DE"F3;,9DE2F3 ;,9DE(F
b. Bse ;,9DE"F3;,9D:2)3;,9DE(Fc. Bse ;,9D:")3;,9D:2)3;,9D:()
15() #ataa+apter ma&es use of ,,,,,,,,, to retriee +ata
a. Comman+ ob>b. +ataset
15-) #ataa+apter is use+ in
a. Connecte+ arci
b. #isconnecte+ archic. 0oth
154) Currenc *anager ob> is +e+icate+ to a single
a. %ormb. control177) to fill a combo box with EmpName from Emp table for readonly purpose,178) Exception raised when DataAdapter updates and dere is a change from the
original data17) difference between read only and const18!) code on class and interfacedim c as new system"arraylist
#onsole"writeline$c"arraylist"tostring)
%hat is the o&p
181)18') there was a (uestion something li*e u want to change address without the
user seeing changeuser"asmx which 1 will u usea" ser+er"executeb" ser+er"tranferc" response"redirect
18")
18()
18-)184)
185)
188)
189)19;)
191)
192)19")
19() +f
21
-
7/27/2019 DotNet Questions 1
22/22