ASP.net Interview Questions & Answers

Embed Size (px)

Citation preview

  • 8/13/2019 ASP.net Interview Questions & Answers

    1/3

    Which component can be used for reporting in ASP.Net?

    1. HTML Table2. Data Grid

    3. Data Repeater

    4. All of the aboveAnswer: 4

    Please brief not about XSD,XSLT X!L.

    XSD stands for XML She!a Definition."t define the str#t#re of the XML file and theele!ents and attrib#tes it ontains.The datat$pe of the ele!ents.So that %hen # pop#late

    XML data into dataset& the dataset an treat ele!ents differentl$ based on their t$pe."f

    XSD is not present dataset treats all ele!ents as strin' t$pe. XSLT stands for XML st$lesheet lan' tranfor!ation."t is lan' #sed for transfor!in' XML data in one for!at to

    another for!at.()a!ple XML data into HTML for!at. XSLT #ses X*ath to identif$ the

    ele!ents in XML do and transfor! those to desired for!at

    "f #e remo$e #eb.config or machine.config from the application then, "s this

    application #ill #or%s?

    "f %e re!ove the %eb.onfi' file fro! the appliation it %ill %or+.

    #nless it doesnt have the thin's li+e onnetionstrin' et.

    &o# to reduce the #idth of te'tbo' in (dit)ommand)olumn of Data*rid?

    onvert te)tbo) ol#!n into a te!plate then it lets $o# han'e its %idth

    What is e$ent bubbling?

    (vent ,#bblin' is nothin' b#t events raised b$ hild ontrols is handled b$ the parentontrol. ()a!ple- S#ppose onsider data'rid as parent ontrol in %hih there are several

    hild ontrols.There an be a ol#!n of lin+ b#ttons. (ah lin+ b#tton has li+ event.

    "nstead of %ritin' event ro#tine for eah lin+ b#tton %rite one ro#tine for parent %hih%ill handlde the li+ events of the hild lin+ b#tton events.*arent an +no% %hih hild

    ata#ll$ tri''ered the event.That thr# ar'#!ents passed to event ro#tine. Happ$

    pro'ra!!in'

    What is DLL hell?

    *revio#sl$& before ./(T& this #sed to be a !a0or iss#e. DLL Hell refers to the set ofproble!s a#sed %hen !#ltiple appliations atte!pt to share a o!!on o!ponent li+e a

    d$na!i lin+ librar$ DLL or a o!ponent b0et Model M lass. "n the !ost

    t$pial ase& one appliation %ill install a ne% version of the shared o!ponent that is notba+%ard o!patible %ith the version alread$ on the !ahine. Altho#'h the appliation

    that has 0#st been installed %or+s %ell& e)istin' appliations that depended on a previo#s

    version of the shared o!ponent !i'ht no lon'er %or+. "n so!e ases& the a#se of the

    +atnabhumi 1

  • 8/13/2019 ASP.net Interview Questions & Answers

    2/3

    proble! is even !ore s#btle. "n !an$ ases there is a si'nifiant dela$ before a #ser

    disovers that an appliation has stopped %or+in'. As a res#lt& it is often diffi#lt to

    re!e!ber %hen a han'e %as !ade to the !ahine that o#ld have affeted theappliation. A #ser !a$ re!e!ber installin' so!ethin' a %ee+ a'o& b#t there is no

    obvio#s orrelation bet%een that installation and the behavior the$ are no% seein'. The

    reason for these iss#es is that version infor!ation abo#t the different o!ponents of anappliation aren5t reorded or enfored b$ the s$ste!. Also& han'es !ade to the s$ste!

    on behalf of one appliation %ill t$piall$ affet all appliations on the !ahine.

    What is the difference bet#een Ser$er.Transfer and +esponse.+edirect? Wh #ould

    " choose one o$er the other?

    Server.Transfer is #sed %hen rediretin' the %ebpa'e %ith in the sa!e appliation%hereas Response.Rediret is appliable to%ards the rediretion of %ebpa'e bet%een 2

    appliations

    Response.Rediret %ill instr#t bro%ser to all a parti#lar %ebpa'e. This %ill inrease

    one re6#est and one response bet%een the lient and server.

    List out controls #hich doest not ha$e e$ents

    line and shape ontrols

    What method do ou use to e'plicitl %ill a user s session?

    session.abandon7to +ill all

    session.re!ove7to spe ite!

    What does the -(nableie#State- propert do? Wh #ould " #ant it on or off?

    "n Dot /et State of b0ets8ontrols is stored in hidden field na!ed 9:ie%State this is

    done a#to!atiall$ b$ dot net

    life ti!e of this ontrol is life of pa'e i.e till %e are doin' *ost,a+ to sa!e pa'ethro#'h (nable:ie%State;tr#e 8false %e an define %hether %e have to !aintain val#es

    of ontrol in hidden fields %hen pa'e is posted ba+ a'ain and a'ain

    Diff bet#een Web /ser )ontrol and Web )ustom )ontrol.

  • 8/13/2019 ASP.net Interview Questions & Answers

    3/3

    "n #hat order do the e$ents of an ASPX page e'ecute. As a de$eloper is it important

    to undertsand these e$ents?

    1. b0et "nitiali?ation

    2. Load :ie%state Data

    3. Load*ostData *roesses *ostba+ Data

    4. b0et Load

    =. Raise *ost,a+ han'e (vents

    @. *roess lient7Side *ost,a+ (vent

    . *rerender the b0ets

    B. :ie%State Saved

    C. Render To HTML

    1. Disposal

    &o# do ou create a permanent coo%ie?

    Settin' a per!anent oo+ie is si!ilar to Session oo+ie& e)ept 'ive the oo+ie an

    e)piration date too. "t is ver$ o!!on that $o# don5t speif$ an$ arbitrar$ e)pirationdate& b#t instead e)pire the oo+ie relative to the #rrent date& #sin' the DateAdd

    f#ntion.

    Response.oo+ies/a!e ; !$oo+ieResponse.oo+ies/a!e.()pires ; DateAdd!& 1& /o%

    Which method do ou use to redirect the user to another page #ithout performing a

    round trip to the client?

    Server. Transfer

    #hat is the difference bet#een Ser$er.Transfer01 and Ser$er.('ecute01?

    Server.Transfer ; Transfer ontrol fro! #rrent pa'e to another pa'e li+e asResponse.Rediret.

    Server.()e#te ontrol 'oto another &proess it and o!e ba+ to sa!e pa'e . Li+e as

    s#bro#tine S#b pro'ra!.

    +atnabhumi 3