98-363 Exam FAQs
What certificate do I earn on passing the 98-363 exams?
If you pass Microsoft's 98-363 exam you will get credit towards the following
certifications:
MTA: Microsoft Technology Associate
Microsoft Visual Studio
What is the exam registration fee? USD 115
Net price does not include applicable taxes, vouchers, promotions, or
membership discounts you may have.
Where do I take the exam?
The Microsoft's Web Development Fundamentals exam is administered by
Certiport and Prometric at testing centers worldwide.
For Certiport: Click here to find a testing center near you. and
For Prometric: Click here respectively to find a testing center near you.
What is the format of the exam?
The exam consists of linear, multiple choice, hot area, drag and drops, build
list and reorder, and build a tree questions. The test can be adaptive and
simulation questions might be asked.
What is the Pre-requisites of the exam?
While there are no official prerequisites to take the Microsoft Technology
Associate certification, both Microsoft and uCertify strongly recommend that
the candidate have foundational knowledge in Web-based applications by
using Visual Studio, the .NET Framework, and managed code. Candidates are
expected to have some experience with a .NET language such as C# or
VB.NET.
How many questions are asked on the exam?
The exam contains 40-60 questions.
What is the duration of the exam?
120 minutes
What is the exam's retake policy?
In the event that you fail your first attempt at passing the Web Development
Fundamentals 98-363 examination, Microsoft's retake policy is:
If a candidate does not achieve a passing score on an exam the first
time, there is no waiting period before retaking the exam.
If a candidate does not achieve a passing score the second time, the
candidate must wait 24 hours before retaking the exam a third time.
A seven-day waiting period will be imposed for each subsequent exam
retake.
A candidate may not take a given exam any more than five times per
year (12 months). This 12-month period would start the day of the fifth
unsuccessful exam retake. The candidate would then be eligible to
retake the exam 12 months from that date. In order to take a given
exam more than five times per year, a candidate must submit a request
and obtain prior permission from Microsoft.
If a candidate achieves a passing score on an MTA exam, the candidate
cannot take it again.
What is the validity of the certification?
Microsoft Technology Associate has no expiration. The certification holder is
certified for life unless the vendor changes their policy. Click here for more
information.
Where can I find more information about this exam?
You can find more information about the 98-363 exam from this link:
https://www.microsoft.com/learning/en-us/exam.aspx?ID=98-363
http://www.microsoft.com/learning/en-us/exam-98-363.aspx
98-363 Course/Exam Objectives
Chapter 1: Programming Web Applications
Customize the layout and appearance of a Web page
Understand ASP.NET intrinsic objects
Understand state information in Web applications
Understand events and control page flow
Understand controls
Understand configuration files
Chapter 2: Working with Data and Services
Read and write XML data
Distinguish between DataSet and DataReader objects
Call a service from a Web page
Understand DataSource controls
Bind controls to data by using data binding syntax
Manage data connections and databases
Chapter 3: Troubleshooting and Debugging Web Applications
Debug a Web application
Handle Web application errors
Chapter 4: Working with Client-Side Scripting
Understand Client-side scripting
Understand AJAX concepts
Chapter 5: Configuring and Deploying Web Applications
Configure authentication and authorization
Configure projects, solutions, and reference assemblies
Publish Web applications
Understand application pools
Question and Answer
Postback
Allows the developer to separate code that needs to be run only when the page is first
loaded.
In a desktop application, the page only gets loaded once for the user to work
with it.
In a web application, the page is completely reloaded every time the server processes
something on it.
Response.Write
Used to print text or the value of a variable onto the webpage.
Does it matter if AutoEventWireup is on with VB?
No because events are not wired to the code-behind, so they still fire.
The Method Name dropdown box in VB is not affected by the value of what?
The AutoEventWireup value
What is the order for the 10 page events?
PreInit
Init
InitComplete
PreLoad
Load
LoadComplete
PreRender
PreRenderComplete
SaveStateComplete
Unload
What is a Page Event?
An alert specifying that something has changed on the page.
What does PIIPLLPPSU mean?
PreInit, Init, InitComplete, PreLoad, Load, LoadComplete, PreRender,
PreRenderComplete,SaveStateComplete, Unload
What are the 5 main types of page event?
Init, Load, Render, SaveState and Unload.
PreInit
This is where a test can be made to see if this is a postback page. Also where controls
are created or re-created, sets the master page, sets the theme, reads or sets property
values.
Init
Buttons, labels, or the form itself, called controls, can have their properties read or
initialized.
InitComplete
Changes to the view state can be made here.
PreLoad
Not a commonly used event.
Load
This too can be used for setting control properties. It is also used for database
connections.
LoadComplete
Some controls need to be placed on the form before changes to their properties will
take effect or before their methods can be run. Do it here.
PreRender
This is the last stage before ASP.NET starts converting everything into a web page.
Make any final changes here.
PreRenderComplete
This is a special event for binding data to controls.
SaveStateComplete
The view and control states have been saved at this stage. Placing code here will
affect this page, but these changes will not be used for the next postback.
Unload
This event fires for each control found on the page. Then, the unload event will fire
for the page itself. This is commonly sued for cleanup methods such as closing files
and database connections. This is also where new pages can be called to pop up.
What are the 11 application events?
BeginRequest
AuthenticateRequest
DefaultAuthentication
AuthorizeRequest
ResolveRequestCache
AcquireRequestState
PreRequestHandlerExecute
PostRequestHandlerExecute
ReleaseRequestState
UpdateRequestState
EndRequest
AE1: A request has been received
BeginRequest application event
AE2: Identity of the user has been established.
AuthenticateRequest application event
AE3: Ensures authentication has occurred
DefaultAuthentication application event
AE4: User authentication has been verified.
AuthorizeRequest application event
AE5: Authorization has been verified to use the cache
ResolveRequestCache application event
AE6: Current state has been acquired
AcquireRequestState application event
AE7: Event handling is about to start.
PreRequestHandlerExecute application event
AE8: Event handling is finished.
PostRequestHandlerExecute application event
AE9: Requests for state have been saved
ReleaseRequestState application event
AE10: Cache is ready for subsequent requests
UpdateRequestCache application event
AE11: The request has been processed
EndRequest application event
What are the 4 most common application events?
Application_Start
Application_End
Application_Error
Application_LogRequest
Application_Start
Triggered when the web app is first launched. Only fired once in the lifetime of the
app. An ideal place to initialize variables that will be used throughout the site.
Application_End
Triggered just before the app is terminated. Typically people will free up application
resources or save logging info.
Application_Error
Triggers when an error occurs on the site.
Application_LogRequest
Triggered only when a request has been made to the application; used for custom
logging.
What are the two session events?
OnStart and OnEnd
Session_OnStart
Triggers when a new user starts a session for the first time
Session_OnEnd
Triggers when a session is terminated.
Where do the events in the application and session stages of the app occur?
These only occur on the web server.
What is Global.asax?
A file on the server that, if present, contains program code for handling session and
application events. These events are only processed from the file and nothing from
this file is ever passed to the client's browser.
What are the stages of the Page life cycle in order?
1. Compile page
2. Set request and response
3. Initialize page controls
4. If postback, load control properties from view state
5. Validates pages and controls
6. Call control event handlers
7. Save view state
8. Unload request and response
When does the Init page load event start?
After each control has been initialized
When should you dynamically add a control to a page?
In the INIT phase.
What is the PreLoad page event used for?
To change things before the view state loads
What phase should you initialize your page controls?
During the Load event because ASP.net already knows whether the request is a
PostBack or not.
Which page event does Visual Studio include by default?
The Page_Load event, because it's the most likely one you're going to attach code to.
When do Button.Click events run?
Right after Load but before LoadComplete
Which event is useful for making final changes to pages and why?
The PreRender event because all the controls will have been initialized and all
PostBack events have taken place. Also occurs before saving the ViewState.
What must you do to use cross-page posting?
Change the value of the PostBackUrl property of a control.
What is the difference between Response.Redirect and Server.Transfer?
Server.Transfer will serve a second page to the browser without changing the URL,
whereas Response.Redirect will actually forward to the new URL and change it in the
browser.
What is the name of the file which contains all .NET settings on a computer?
machine.config - Do not change this unless you know what you're doing.
Where would the values of items entered into the web.config file be accessed
from?
System.Configuration.ConfigurationSettings.AppSettings["variableName"]
What is connection pooling?
The process of reusing active connections in IIS instead of making new ones as people
request items from a database.
What are the 7 page cycle STAGES? (Not events)
Page request, Start, Initialization, Load, Postback event handling, Rendering, Unload.
If there are multiple style sheets, which one does the browser use?
The last one it reads.
What kind of tag are css styles defined in?
A <link> tag.
How do you define a specific class of CSS style?
By starting it with a period. Such as .class
What word do you add inside a style sheet so that nothing can override it?
!important
What are the 3 main types of client side storage?
Cookies
Query Strings
ControlState
How often are cookies submitted?
At every subsequent request from browser to the server.
What are query strings good for?
Can be passed from one page to another.
What does controlstate do?
Stores hidden data in a web form.
3 types of server side storage?
Session object
Application object
Databases
How long do session objects last by default?
20 mins
What is the only type of persistent server side storage?
Databases
Name different types of controls:
HTML Controls
Server controls
User controls
Custom controls
Which type of control cannot be accessed by ASP.NET?
HTML controls
Which type of control always has a runat attribute and an id?
Server controls
How do you catch exception errors within a method?
By using a try-catch-finally block.
If you have to dispose of an object where would you do it?
In the finally area, which always runs with or without an exception.
How would you create an exception on purpose?
Throw it.
What does the remoteOnly attribute in <customErrors> do?
It allows you to control whether or not you see custom errors or generic errors when
debugging a page.
How would you see a number of variables, headers, etc with your page?
Enable/use Tracing.
What does Tracing show you about your page?
HTTP Headers
Execution Times
Client IP address
Query String parameters
Cookies
What is the most commonly used Page Life Cycle event?
Load
How do you specify the version of the .net framework you are using?
By using application pools.
What are some benefits of application pools?
Can isolate sites away from each other.
What are several different deployment methods?
Web packages
Xcopy
Publishing
Windows Installer packages
Which site deployment methods utilizes a zip file that you unzip on the server?
Webpackages
Which type of deployment method can make changes to the server?
Windows Installer packages
What is the most popular client scripting environment?
Javascript
Where would you want to place your javascript?
Javascript is executed top to bottom, therefore you would not want to place a large
script at the top because it will inhibit page loading. Small scripts can go up top but
larger ones should be lower.
What does the ScriptManager control do?
Communicates with the server to ensure necessary elements are present.
What do you need to add to a content page if you used a ScriptManager on a
master page?
A ScriptManagerProxy
What does AJAX stand for?
Asynchronous JavaScript and XML - A set of web development codes and techniques
used to create client-side Web interfaces and applications.
What is application state?
A collection of shared user-defined variables.
What is Authentication?
How you verify the identity of a user, computer or person.
What is a message produced by a browser that something has occurred called?
An event.
What is impersonation used for?
Allows an entity to assume the identity and privileges of another entity without
restrictions and without any indication visible to the recipients that delegation has
taken place
What is the main template page for all pages in a web site called?
The Master page. Normally contains the menu, copyright information and any
content duplicated across all pages in a site.
What is view-state?
A page-level management tool which is used to maintain the state of Web Form
controls.
What is jQuery?
A collection of JavaScript scripts which may be used to speed up the process of
writing code.
What does AutoEventWireup do?
Ties events to the code-behind of the page.
What do you call the topmost part of an ASP.NET web page and what does it
do?
It is called the Page directive and is used to specify the coding language, the name of
the code-behind file, setting AutoEventWireup to true/false and more.
When do the items of code in the Page_Load event happen?
Every time the page is loaded in a browser.
With AutoEventWireup set to false...
...the page events are not fired because the events are no longer wired to the code-
behind.
What is AutoEventWireup set to by default in visual basic?
False
What does "Me" mean in reference to Visual Basic handles?
It is an alias for the current form. For example Handles Me.Load references events
occurring in the current form.
What keyboard combination runs the site step by step in debug mode?
F5
What keyboard combination runs the site normally as an end user would see
it?
Control+F5
Do event handlers work with C# ?
No, it is used for visual basic.
Where is the Method Name drop down menu located?
In the code-behind view of a .cs or .vb file, on top of the source code on the right
hand side.
Where is the Class Name drop down menu located?
In the code-behind view of a .cs or .vb file, on top of the source code on the left hand
side.
What does the Method Name drop down menu contain?
All the events related to the web page.
What happens to the list of events in the Method Name drop down list of a
visual basic ASP.NET file if you change the AutoEventWireup attribute to False?
Nothing, visual basic is not reliant on autoeventwireup, therefore the method name
list always contains the events related to the page whether AEWU is true or false.
What happens in the Method Name drop down list if you remove the event
handler from an event procedure in a VB asp.net file?
The events disappear because the event handler is no longer present.
What does a C# file need in order to see events?
It needs AutoEventWireup to be set to true.
What does a visual basic file need in order to see events?
An event handler.
How do you set a breakpoint?
By clicking the gray area to the far left of the event procedure header.
At what point of an event procedure does the breakpoint pause at?
Right before the code of that procedure runs.
What does Shift+F5 do in visual studio?
It continues running the page and exits debugging mode if you were in the process
of using F5 to debug.
How do you add code to the code-behind in a visual basic file?
You can either double click a control or choose an item from the method name drop
down list and it will place most of the code on the page for you.
How many times can you use an event procedure from the Method name drop
down?
Each event procedure can only be run once per page. If you try to add a duplicate
event procedure to your page it will simply move your cursor to the one you already
have.
What happens during the PreInit stage?
You can test to see if this is a postback or not.
What stage do buttons, labels or other controls have their properties read?
The Init stage.
What stage would you make changes to the view state in?
The InitComplete stage, since the controls have been read or initialized at this point.
What can you do in the Page_Load stage?
You can set control properties here, also connections to a database typically happen
here.
What happens in the LoadComplete stage?
Some controls need to be placed on the form before changes to their properties will
take effect, you'd do that here.
What page life cycle would you make any final changes to your page?
The PreRender stage. This is the last stage before things get converted into HTML by
IIS.
In what stage are the view and control states saved by?
The SaveStateComplete stage.
What stage can you place code which will not be used for the next postback?
In the SaveStateComplete stage.
Which event fires the controls found on the page?
The Unload stage. For example if you click a button it will fire that event, then fire
the whole page, then unload the page normally as a Postback, where the whole
process starts again.
What is the name of the code at the top of an ASP.NET page which includes <%
%> ?
The page Directive
Encapsulations of sections of pages which are registered and used as controls
in ASP.NET are?
User controls
Custom controls do not have an ASCX markup file, what do they use instead?
DLL's
Where would you initialize shared user-defined variables of an application?
In the Application_OnStart event in the global.asax file.
What is the hidden field called that is used to send information to the browser
from a web form?
_VIEWSTATE
What is ViewState mostly used for?
To preserve form information across Postbacks.
What kind of encryption is used by viewstate?
base64 serialization, which is easy to decode
What are master pages?
Basically template pages, which can be nested, used to decrease the amount of repeat
code needing to be used.
asax file ext
The global application file, commonly called Global.asax, used for application-level
logic and for defining global variables that work across the entire application.
ascx file ext
User control files
axd file ext
These are used for trace files when they are enabled in the web.config file
config file ext
Most often web.config, these are the configuration files, which can be nested, that
define specific parameters. These are xml files.
cs or vb file ext
Used for the code behind files. For example Website.aspx would be the main design
page but Website.aspx.cs would be the C# code-behind page for it.
dbml file ext
LINQ to SQL data classes file
edmx file ext
ADO.NET Entity Framework model
master file ext
Used for master page files. Default name is Master1.master
sitemap file ext
Used for sitemap files, the default is web.sitemap
skin file ext
Used for skinning files
svc file ext
Used for Windows Communication Foundation service files (WCF)
What is in the App_Code directory?
The raw code files themselves.
What is in the App_Data directory?
The default directory for any databases used by the asp.net website.
What is in the App_LocalResources directory?
Can be used to hold localization files so the asp.net site can change languages
automagically.
What is in the App_GlobalResources directory?
Holds resx files with localized resources available to every page of the site. This is
where asp.net developers will typically store localized messages which are used on
more than one page.
What is in the App_Themes directory?
Holds files related to themes which is a new asp.net feature that helps ensure a
consistent appearance throughout a web site and makes it easier to change the web
site's appearance when necessary.
What is in the App_WebReferences directory?
Holds discovery files and WSDL files for reference to web services to be consumed in
the site.
What is in the Bin directory?
Contains compiled code (.dll files) for controls, components or other code that you
want to reference in your application. Any classes represented by code int he Bin
folder automatically get reference in your application.
Why is it important to understand the page life cycle?
So you can put your code in the appropriate section for the effect you intend.
What's the difference between page life cycle events and application life
cycle events?
Page events happen each time you go to a new page or reload/postback the one you're
on. Application events occur when the App starts and stops regardless of who is going
to what pages.
Why wouldn't it work to try to manipulate controls with code in the
Initialization page life cycle stage?
Because the data has not yet been loaded and control values have not yet been
restored from view state. That happens next in the Load cycle.
What happens during the Unload stage of the page life cycle?
This event occurs after the page has been rendered and sent to the client/browser.
Page properties are unloaded and cleanup is performed to free up memory.
Why is it important to use the IsPostback property on a page?
So you can sense whether or not the page has already been initialized and therefore
not waste resources doing it again. Prevents the page from processing the same code
on every postback.
Why is postback needed for web sites but not for desktop applications?
Because desktop applications only initialize once whereas web pages will initialize
each server round-trip.
How would you define a session variable called X that has Hello world in
it?
Session["X"] = "Hello world";
How would you use a session variable called X in another page?
Set the label or control by using:
Label1.Text = Convert.ToString(Session["X"]);
What is the difference between Response.Redirect and Server.Transfer?
Response.Redirect forwards you to the new page and reflects the new URL whereas
Server.Transfer sends the browser a different page but leaves the URL the same. As
far as the browser is concerned it is displaying the same page as before.
What is required to use cross-page posting?
The PostBackURL property must be set on the control. For example on a Button
control you would set the PostBackURL to another page, then when you click the
button it sends you to that page.
What is cross-page posting?
Moving data from one page to another.
Give a summary of Response.Redirect:
1. It's the standard method of switching to another page.
2. It can be directed to any URL
3. ViewState is not applicable
Give a summary of Server.Transfer:
1. The browser is unaware that the web page changed.
2. URL doesn't change (incomplete page cycle)
3. It's limited to pages on the current site
4. ViewState is supported but does not include ViewState variables.
Give a summary of Cross-page posting:
1. A simpler form of Server.Transfer
2. Uses the PostBackURL method of a web control to change pages.
3. URL changes (complete page cycle)
4. It's limited to pages on the current site
5. ViewState supported but does not include ViewState variables.
What kind of objects are user controls?
System.Web.UI.UserControl objects. They are saved separately as .ascx files.
What kind of objects are server controls?
System.Web.UI.WebControls objects
How do you add a user control to a page?
Add a Panel control, then drag the .ascx file from the solution explorer to the Panel.
How would you reuse a user control for a different site?
You must copy the control to the new website because they only work on a site by
site basis and cannot be added to the toolbar.
What is the name of the file which contains all default settings for the
entire .net system on a computer?
Machine.config
How do you get to where you can add users to a site?
In visual studio, click the Website menu, then ASP.NET configuration.
What are the two methods of authentication seen in the web.config file?
Windows mode or Forms mode.
How would you compare the input of a textbox to the value of
"myPassword" which is saved in the appSettings of the asp.net
configuration?
An if statement such as: if (TextBox1.Text ==
System.Configuration.ConfigurationSettings.AppSettings["myPassword"])
Label1.text = "You're in"; else Label1.text = "Incorrect Password";
How do you make a global.asax file?
You must click Add New Item, then select Global Application Class.
Name the 6 ASP.NET intrinsic objects:
Request
Server
Application
Session
Response
HttpContext
What is the app.config file for?
It contains the .net configuration data which is a chain of settings specific to a
Windows application. It is normally in the root directory of the application that is
being configured.
What does ASP stand for?
Application Service Provider
When creating css classes what must you remember?
To enclose the elements in curly braces and use a ; at the end {like this;}
What must you remember to add to an img tag?
The Alt="" text - Example: <img src="image1.gif" alt="This is Alt text" />
What 4 things are required in order to configure an endpoint when using
a WCF service?
Address: specifies the location of the endpoint
Binding: specifies how the client communicates with endpoint
Contract: identifies the availability of operations
Behavior: specifies local implementation details of endpoint
What are 3 modes of persistence for session variables?
In Process mode
ASPState mode
SqlServer mode
What's the difference between AppSettings and ApplicationSettings?
AppSettings is from .net 2.0 vs ApplicationSettings which is .net 3.5 and 4
What would you store as an application setting?
Anything someone may need to edit down the road such as database connection
strings and other variables.
If you create an application setting where will it be stored?
In the web.config file under the applicationSettings tab. The setting will have a name
and serializeAs attribute as well as a nested <value>value tag</value>
If you create an applicationSetting called greeting how would you then
call it in your code?
By calling the Properties.Settings.Default.greeting value. It is strongly typed when
using applicationSettings. It is not if using the older appSettings.
If you create an appSetting called greeting how would you use it in your
code?
You would have to call WebConfigurationManager.AppSettings["greeting"]. It is NOT
strongly typed, you must type it correctly.
How do you add an appSetting?
Through the ASP.NET configuration webpage.
What namespace do you have to add to your page in order to call an
appSetting?
using System.Web.Configurations
Why would you use the configSource option?
To allow admins to set a specific value without giving them access to the rest.
What is camelcase?
The method used by most traditional programming languages when typing multi
word variable names, parameters etc where the first word is lower case and
subsequent words have the first letter capitalized. For example
thisWouldBeCamelCase.
Where would you set the configsource property?
In the web.config as an option for a parameter. For example in the system.web section
you could add <trace configSource="trace.config" /> to both add the trace element
and point it to the trace.config file. This would enable system administrators to turn
tracing on or off by editing that trace.config file, and you could still block access to
the root web.config so they couldn't change anything else.
What is the first part of any style sheet?
The selector
What is the difference between a class selector and an ID selector?
A class selector, such as t.center, is used to specify a style for a group of elements,
in this case anywhere you'd use a T tab. The ID selector allows you to style a unique
element. You specify the name of it and then call it in your code using the same ID.
For example #id1 {color:green;} in the CSS and then <p id=id1> in the HTML.
What does the <sub> tag do?
Its used to change the appearance of the enclosed text or numeric as subscript,
making it look like footnotes.
What does the <sup> tag do?
Its used to change the text to superscript such as 10 to the 3rd power.
How do you comment ASP.NET code?
By using double slashes // like this
How do you comment HTML code?
By using an exclamation point and dashes <!-- Like this -->
How would you invert the hue, saturation, etc of an image using HTML?
In the img tag, use the STYLE="filter:Invert" inline style
How do you specify a copyright symbol in HTML?
By using ©
How do you specify a trademark symbol in HTML?
By using ®
Which ASP intrinsic object would you use if you want to extract
something from the user?
The request object.
What do session objects do?
They hold information about one single user in the form of variables, and are
available to all pages in one application.
What do application objects do?
They contain properties and methods related to the currently running application
regardless of how many users or what page they're on.
Which intrinsic object would you use to read a cookie?
The response object.
What's the main purpose of ViewState?
To preserve form data across postbacks. That way if someone submits something
that had a wrong value, the rest of the fields aren't lost. They are simply repopulated
after the postback with their previous information.
What are the 7 page life cycle stages?
Page request
Start
Initialization
Load
Postback Event Handling
Rendering
Unload
Provide info about custom controls:
Designed for multiple applications
Added to the application's BIN directory or in the global assembly cache
Hard to create
Good for dynamic content
Can be added to the toolbox in visual studio
How do you enable custom errors?
In the web.config, under system.web, add the tag <customErrors mode ="On" /> You
could then also set a redirect page if someone gets an error by using <customErrors
mode="On" defaultRedirect="errorPage.aspx"/>
What is a DTD?
Stands for Document Type Definition, is written in a formal syntax and explains
precisely which elements may appear where in a document and what the element's
contents and attributes are. Basically the rules for an xml document.
What command can be used to simulate an exception error?
The Throw command
What is a web service?
A software system intended to support interoperable machine to machine
interactions over a network.
What is in a WCF service?
Composed of three parts: A service class that implements the service to be provided,
a host environment to host the service and one or more endpoints to which clients
will connect.
Which folder contains reference contract files (.wsdl), schemas (.xsd) and
discovery document files (.disco) ?
The App_WebReferences folder
Describe SqlDataSource
SqlDataSource is a db connection that uses an ADO.net provider such as SqlClient
or ODBC. It enables a web server control to access data located in a relational db. It
can be used with data bound controls such as gridview/formview etc to display and
modify data on a web page.
Describe XmlDataSource
XmlDataSource represents an XML data source to the data-bound controls such as
gridview and treeview. Controls can use XmlDataSource to display heirarchical and
tabular data. XmlDataSource extends the HierarchicalDataSourceControl class and
also implements the IDatasource interface.
Describe LinqDataSource
Allows the use of LINQ in ASP.net by using the markup text to fetch and modify the
data from an object. It uses LINQ to SQL to auto generate the data commands. A
user can fetch or alter the data without having to write the SQL commands.
Which character is used to define a data binding?
<%# %> Pound sign. Also, the Eval method is used for read-only and the bind method
is used to be able to read/write.
Which 2 methods does the Server intrinsic object use?
Execute - runs another page and returns the calling page
Transfer - runs another page but does not return
What command is used to retrieve rows from a data source in a
DataReader?
ExecuteReader
Which class provides objects that are constructed automatically for
every request and destroyed when the request is completed?
HttpContext
What's the main reason for having a strong name for an assembly?
It is used at runtime to locate the assembly.
What does a transaction object do?
It allows you to process multiple SQL statements together as a group. If one fails, the
transaction would roll back and reverse all parts of the group. Think of an online
transaction.
Which two elements are required in the web.config?
configuration and system.web
What are the 5 basic steps in the life cycle of a WFC application?
1. Defining the service contract
2. Implementing the contract
3. Configuring the service by determining endpoint details
4. Hosting the service in an application
5. Building a client application
What is WCF?
Stands for Windows Communication Foundation. It is an application programming
interface in the .net framework for building connected, service-oriented applications.
Name the 500 series HTTP error codes
500: Internal server error
501: Not Implemented
502: Bad Gateway
503: Service Unavailable
504: Gateway Timeout
505: HTTP Version not supported
509: Bandwidth Limit Exceeded
Name the two attributes required for a control to be considered data-
aware?
DataSource and DataSourceID
QUESTION 1
When configuring a Windows Communication Foundation (WCF) client, where
do you define the URL for the WCF service?
A. In the registry on the client computer
B. In the Global.asax file
C. In the <endpoint> element in the configuration file
D. In the <binding> element in the configuration file
Correct Answer: C
QUESTION 2
When a Web site is created, IIS:
A. will place the Web site in the first application pool listed alphabetically on
the drop-down list in IIS.
B. will place the Web site in DefaultAppPool.
C. will not place the Web site in an application pool.
D. will prompt the administrator to create a new application pool or to select
an existing one.
Correct Answer: B
QUESTION 3
Which property of the SqlDataSource control includes the name of the
database and other parameters needed to establish the connection?
A. ConnectionString
B. SelectCommand
C. GridView
D. SelectParameters
Correct Answer: A
QUESTION 4
Which statement appends the text "User not authenticated" to the trace log
or the page using red text?
A. Trace.Warn("User not authenticated");
B. Response.Write("User not authenticated");
C. Debug.Write("User not authenticated");
D. Trace.Write("User not authenticated");
Correct Answer: A
QUESTION 5
Building a Web application using a Release mode configuration:
A. compiles the code and optimizes it for processing.
B. prevents changes to the Web.config file.
C. prevents changes to the source code files.
D. publishes the application to a remote server.
Correct Answer: A
QUESTION 6
Which statement about Asynchronous JavaScript and XML (AJAX) partial-
page updates is true?
A. An UpdateProgress control is necessary for partial-page updates.
B. The Timer control can only update a single UpdatePanel control.
C. A ScriptManager control is not necessary for partial-page updates.
D. An UpdatePanel control enables a part of your page for partial-page
updates.
Correct Answer: D
QUESTION 7
You are creating a Windows Communication Foundation (WCF) service. You
write the interface shown in the exhibit. Which attribute should decorate the
function?
A. WebMethod
B. OperationContract
C. ServiceContract
D. Serializable
Correct Answer: B
QUESTION 8
The following XML contains an error.
<PriceConstraint type="sale">Sale < Regular</PriceConstraint>
How could you correct it?
A. Enclose Sale < Regular in double-quotes.
B. Enclose the < in double quotes.
C. Enclose Sale < Regular in single-quotes.
D. Replace the < with an escape character sequence.
Correct Answer: D
QUESTION 9
You include the following markup in your Web.config file:
<authorization>
<allow users="?" />
</authorization>
Which users are allowed access?
A. No users
B. Anonymous users
C. All users who have cookies disabled
D. No anonymous users
Correct Answer: B
QUESTION 10
To successfully call a Web service in a Web application, you should:
A. ensure that port 80 is opened on the firewall.
B. ensure that port 443 is opened on the firewall.
C. ensure that port 21 is opened on the firewall.
D. ensure that port 25 is opened on the firewall.
Correct Answer: A
QUESTION 11
In a Web application that has multiple Web.config files in separate directories,
how are configuration settings applied?
A. The configuration settings in the Web.config file that is in the root directory
take precedence over all other Web.config files.
B. Each Web.config file applies configuration settings to its own directory and
all child directories below it.
C. Each Web.config file applies configuration settings to its own directory only.
D. Each Web.config file applies configuration settings to its own directory and
all parent directories above it.
Correct Answer: B
QUESTION 12
A Web page includes the JavaScript code shown in the exhibit. What will be
output to the browser when the Web page executes?
A. 1empty23
B. 1undefined23
C. 1null23
D. 123
Correct Answer: B
QUESTION 13
Which configuration setting grants access only to the Webadmin user and
denies access to all other users?
A. <authorization>
<allow users="Webadmin" />
<deny users="?" />
</authorization>
B. <authorization>
<deny users="?" />
<allow users="Webadmin" />
</authorization>
C. <authorization>
<deny users="*" />
<allow users="Webadmin" />
</authorization>
D. <authorization>
<allow users="Webadmin" />
<deny users="*" />
</authorization>
Correct Answer: D
QUESTION 14
Which markup would you add to the Web.config file to prevent users who have
not been authenticated from accessing any page except the login page?
A. <authorization>
<deny users="*">
</authorization>
B. <authentication>
<deny users="*">
</authentication>
C. <authorization>
<deny users="?">
</authorization>
D. <authentication>
<deny users="?">
</authentication>
Correct Answer: C
QUESTION 15
Which approach to state management allows you to store information that
can be maintained for all users of an application in such a way that it will
never expire?
A. Cookies
B. Session State
C. Application State
D. Caching
Correct Answer: C
QUESTION 16
The error in the XML code shown in the exhibit is:
A. XML tag names cannot begin with a number.
B. XML tag names must be lowercase.
C. parent elements cannot contain attributes.
D. numbers are not allowed in XML tag names.
Correct Answer: A
QUESTION 17
In which event handler should you set the theme for a Web site?
A. Page_PreInit
B. Page_PreRender
C. Page_Load
D. Page_PreLoad
Correct Answer: A
QUESTION 18
What is the error in the XML code shown in the exhibit?
A. XML tag names cannot contain uppercase characters.
B. The solution tags do not match.
C. XML tag names cannot contain numbers.
D. The date attribute value should not be in quotation marks.
Correct Answer: B
QUESTION 19
What is the correct Cascading Style Sheet (CSS) syntax for inserting a
comment?
A. /* Comment here */
B. // Comment here
C. /* Comment here
D. ‘ Comment here
Correct Answer: A
QUESTION 20
Which of the following files will you use to identify system specific information
to reduce future compilation changes to the application? (Each correct answer
presents a complete solution. Choose two.)
A. Web.config
B. Trace.axd
C. Global.asax
D. Machine.config
Correct Answer: AD
QUESTION 21
You have an external style sheet that includes the following style:
div
{
color: Gray;
}
You create an .aspx page that includes the following element:
<div style="color:Aqua; text-decoration:underline"> Hello World </div>
How will the text "Hello World" be displayed when the user browses the
page?
A. Gray and underlined
B. Aqua and underlined
C. Aqua and not underlined
D. Gray and not underlined
Correct Answer: B
QUESTION 22
When using the Visual Studio debugger, a breakpoint:
A. makes the program pause after each line.
B. closes the browser and ends the session.
C. is the point at which the code stops executing and throws an exception.
D. pauses the execution of the code.
Correct Answer: D
QUESTION 23
Which of these is a requirement of XML?
A. XML tag names must be all lowercase.
B. XML tag names must be all uppercase.
C. XML tags must not contain any spaces.
D. XML elements must be properly nested.
Correct Answer: D
QUESTION 24
Which property of the SqlDataSource control holds either a SQL query or the
name of a stored procedure that the SqlDataSource control uses to retrieve
data?
A. ConnectionString
B. DetailsView
C. SelectCommand
D. SelectParameters
Correct Answer: C
QUESTION 25
What are two ways to ensure that the time limit required to establish the
connection is not exceeded? (Each correct answer presents a complete
solution. Choose two.)
A. Set the ConnectionTimeout property of the SqlConnection object.
B. Use a DataSet instead of a SqlDataReader.
C. Place all statements that use the connection within a using block.
D. Call the Close method on the SqlConnection object.
E. Store the connection string in the Web.config file.
Correct Answer: CD
QUESTION 26
Your application contains the business class shown in the exhibit. You want
to bind the Species collection to an <asp:Repeater> control. What control
should you use as the data source?
A. AccessDataSource
B. LinqDataSource
C. SqlDataSource
D. XmlDataSource
Correct Answer: B
QUESTION 27
An IIS worker process:
A. is created for each ASP.NET page request.
B. is created for each ASP.NET session.
C. runs under the NetworkService security context by default.
D. runs under the LocalSystem security context by default.
Correct Answer: C
QUESTION 28
You are configuring a Web Application that connects to a SQL Server
database. Which types of authentication are supported by SQL Server Mixed
Mode? (Each correct answer presents part of the solution. Choose two.)
A. SQL Server Authentication
B. Windows Authentication
C. Passport Authentication
D. Forms Authentication
Correct Answer: AB
QUESTION 29
You write a JavaScript function named setCurrent() that changes the color of
an <input type="text" /> element. You need to configure an <input type="text"
/> element to call setCurrent when the user clicks in or tabs to the field. What
property should you set?
A. onclick
B. onselect
C. onfocus
D. onblur
Correct Answer: C
QUESTION 30
What is a Web garden?
A. A worker process that belongs to multiple application pools
B. An application pool that is associated with multiple Web applications
C. A Web application that is associated with multiple application pools
D. An application pool that has multiple worker processes
Correct Answer: D
QUESTION 31
A Web page includes the <asp:UpdatePanel> control. Which other control
must you add to the form?
A. <asp:ScriptManagerProxy>
B. <asp:Timer>
C. <asp:ScriptManager>
D. <asp:UpdateProgress>
Correct Answer: C
QUESTION 32
Which validation control should you use to verify a Personal Identification
Number (PIN) against a column value stored in a record in a database?
A. RegularExpressionValidator
B. CompareValidator
C. CustomValidator
D. RangeValidator
Correct Answer: C
QUESTION 33
What can you use to configure custom error pages for a Web application?
A. An ErrorProvider control
B. A CustomValidator control
C. A Cascading Style Sheet
D. A Web.config file
Correct Answer: D
QUESTION 34
Which state management technique uses a hidden field to store user data
between postbacks of the same page?
A. Session state
B. Application state
C. Cookies
D. View state
Correct Answer: D
QUESTION 35
A Web page has 10 controls. You need to use Ajax to refresh the data in 5 of
the controls when a button is clicked. Which control should you use as a
container for the controls that need their data refreshed?
A. UpdatePanel
B. StatusStrip
C. Panel
D. UpdateProgress
Correct Answer: A
QUESTION 36
You add an <asp:ScriptReference> element:
A. to register a .js script file so that it can be executed as server-side code.
B. to register a .vbs file so that it can be executed as server-side code.
C. to register a .vbs file so that it can be used for partial page updates.
D. to register a .js script file so that it can be used for partial page updates.
Correct Answer: D
QUESTION 37
Which option provides server-based state management?
A. Hidden fields
B. View state
C. Session state
D. Control state
Correct Answer: C
QUESTION 38
When you create an XML Web service to be consumed by a Web site, which
step is optional?
A. Create an .asmx file and declare a Web service in it using the @ WebService
directive.
B. Define the Web service methods that compose the functionality of the Web
service.
C. Apply the WebService attribute to the class implementing the Web service.
D. Create a class that implements the Web service.
Correct Answer: C
QUESTION 39
Users trying to access a page in a Web site are getting an HTTP Error 404
message. Which is the most likely reason?
A. The server could not understand the syntax of the request.
B. The request to the server was forbidden.
C. The URL was entered incorrectly.
D. The server was overloaded.
Correct Answer: C
QUESTION 40
The Step Into debugging option:
A. executes all statements in the function called from the current line of code.
B. stops executing the program at a specific line of code.
C. stops executing at the first line of code inside the function called from the
current line of code.
D. cannot be used to debug an ASP.NET application.
Correct Answer: C
QUESTION 41
You want to add a special announcement to your Web site. You have added a
page named announcement.aspx. The announcement should be displayed at
the top of the home page. The rest of the home page should be displayed as
usual. Which option should you use?
A. Server.Transfer
B. Server.Execute
C. Response.Redirect
D. Meta Refresh
Correct Answer: B
QUESTION 42
You need to use source code written in more than one language in a Web
application. What should you do?
A. Place the files in the root of the App_Code directory.
B. Place the code in subdirectories of the App_Code directory and specify the
names of the subdirectories in the compilers section of the Web.config file.
C. Place the files in the root of the Bin directory.
D. Place the code in subdirectories of the App_Code directory and specify the
names of the subdirectories in the compilation section of the Web.config
file.
Correct Answer: D
QUESTION 43
You set the ErrorPage property of a page named Default.aspx to
"showErrorInfo.aspx". When will showErrorInfo.aspx be executed?
A. When the code-behind file for the Default.aspx page cannot be found
B. When handled exceptions occur while executing the Default.aspx page
C. When an unhandled exception occurs while executing the Default.aspx
page
D. When handled or unhandled exceptions occur while executing the
Default.aspx page
Correct Answer: C
QUESTION 44
You should use a DataReader object to retrieve data when:
A. you need to access a row of data more than once.
B. you need to manipulate data from multiple sources, such as a database
and an XML file.
C. you need to perform a large amount of processing per row.
D. you do not need to cache the data.
Correct Answer: D
QUESTION 45
Which approach to applying style elements to your Web page takes the lowest
precedence?
A. User styles applied by the readers themselves
B. Inline style
C. External style sheets
D. Internal style sheets
Correct Answer: C
QUESTION 46
A Web page contains the script shown in the exhibit. What will be written to
the window when browser executes the page?
A. 166
B. 161
C. 116
D. 111
Correct Answer: A
QUESTION 47
Which object can you use to determine whether the browser used to connect
to a Web application supports cookies?
A. Response
B. Request
C. Application
D. Session
Correct Answer: B
QUESTION 48
You need to use an external style sheet named bcdstyles.css to define the
user interface for an ASP.NET Web site. What should you do?
A. Add a <style> element to the <head> element of the master page.
B. Add a <style> element to the Web.config file.
C. Add a <link> element to the Web.config file.
D. Add a <link> element to the <head> element of the master page.
Correct Answer: D
QUESTION 49
A user control:
A. can contain controls and HTML markup.
B. cannot include server-side code.
C. does not have properties or methods.
D. is a class that inherits from WebControl.
Correct Answer: A
QUESTION 50
Your application must issue several commands on a connection. The
commands must either all fail or all succeed. You write code in the try block
to execute the commands within a SqlTransaction object referenced by tran.
Which statement should you add to the catch block?
A. tran.ResetStatistics();
B. tran.Undo();
C. tran.Rollback();
D. tran.Commit();
Correct Answer: C
QUESTION 51
You use a DataReader to:
A. retrieve an updateable result set.
B. cache data for use after the Connection object is closed.
C. reduce the load on the database server.
D. retrieve a read-only, forward-only result set.
Correct Answer: D
QUESTION 52
When using the Copy Web Site tool:
A. source code files are precompiled if they are in the App_Code directory,
and then copied.
B. all source code file are copied and then compiled.
C. all source code files are copied and later compiled upon request.
D. all source code files are precompiled and then copied.
Correct Answer: C
QUESTION 53
An AJAX page contains several <asp:Bbutton> controls that trigger partial-
page updates in an UpdatePanel control. You click the buttons and several
updates occur. What is the result after the partial-page updates?
A. The page reloads with all updates visible when you click the Back button.
B. The original page reloads without any of the updates when you click the
Back button.
C. The Back button is inactive.
D. All updates except the most recent one are still visible if you click the Back
button.
Correct Answer: C
QUESTION 54
You want to use the Publish Web Site tool in Visual Studio 2010 to deploy a
Web site on a remote server that does not support FTP, but it does support
FrontPage Server Extensions.
Which option should you select in the Publish Web Site dialog box?
A. Local IIS B. FTP Site
C. Remote Site D. File System
Correct Answer: C
QUESTION 55
Which type of control is the most difficult to create?
A. A CompareValidator control
B. A server control
C. A RangeValidator control
D. A user control
Correct Answer: B
QUESTION 56
In which folder should you place a file that is used to create a reference to a
Web service?
A. App_WebReferences
B. App_LocalResources
C. App_Data
D. Bin
Correct Answer: A
QUESTION 57
Which ASP.NET DataSource control would you use to connect to an Oracle
database?
A. AccessDataSource
B. OracleDataSource
C. SqlDataSource
D. ObjectDataSource
Correct Answer: C
QUESTION 58
Which GridView control event can you use to prevent data in the data source
from being modified if the new data contains invalid values?
A. RowUpdating
B. RowEdited
C. RowDataBound
D. RowEditing
Correct Answer: A
QUESTION 59
Your Web site includes a number of hyperlinks. You want each hyperlink to
display with a silver background when the user’s mouse rests over it. Which
Cascading Style Sheet (CSS) style rule should you define?
A. link.hover {background-color:silver;}
B. a.mouseover {background-color=silver;}
C. link:mouseover {background-color=silver;}
D. a:hover {background-color:silver;}
Correct Answer: D
QUESTION 60
Settings defined in the Machine.config file:
A. apply to Windows applications, but not ASP.NET applications.
B. apply to ASP.NET applications, but not Windows applications.
C. are overridden by settings defined in an application’s Web.config file.
D. take precedence over the settings defined in an application’s Web.config
file.
Correct Answer: C
QUESTION 61
You create a project that includes a file named promos.asmx. You write the
class shown in the exhibit. You need to ensure that client applications can
call the GetTodaysDeals function by passing a query string to promos.asmx.
What should you do?
A. Modify the class to inherit WebService and change the method’s return type
to Xml.
B. Decorate the method with the WebMethod attribute.
C. Decorate the method with the WebService attribute.
D. Change the method’s return type to Xml.
Correct Answer: B
QUESTION 62
You are developing an intranet application. The application requires users to
log on, and you need to store the user’s identity in a session variable. The
approach you take should require the least amount of time and resources.
Which session state mode should you use?
A. Custom
B. StateServer
C. InProc
D. SQLServer
Correct Answer: C
QUESTION 63
Which statement about client-side scripting languages is true?
A. Client-side scripting languages cannot be used to validate user input before
submitting a page to the server.
B. Client-side scripting languages can access a database on the server.
C. The browser understands only HTML and client-side scripting languages.
D. VBScript, JavaScript, and C# are all examples of client-side scripting
languages.
Correct Answer: C
QUESTION 64
You need to use a DataSet object to retrieve data when you need to:
A. access data in a forward-only and read-only manner.
B. access each row of data only data once.
C. manipulate data from multiple sources, such as a database and an XML
file.
D. process a result set that is too large to fit into memory.
Correct Answer: C
QUESTION 65
A Web application has a page that includes the code shown in the exhibit.
What will happen when this page executes?
A. An exception will occur because a function cannot be called with the
<head> block.
B. The function will be executed by the client browser.
C. An exception will occur because a JavaScript function cannot be defined
in the <head> block. D. The function will be executed by the Web server.
Correct Answer: B
QUESTION 66
Your ASP.NET application includes the following code in the
ListBox1_SelectedIndexChanged event:
ShowFields(ListBox1.SelectedValue);
The ShowFields method displays fields on the page, based on the value the
user selects in ListBox1. When you test the code, no fields are displayed on
the page. What is the most likely reason?
A. You need to move the code to the Page_Load event procedure.
B. You need to set the AutoEventWireup attribute in the @ Page directive to
true.
C. You need to move the code to the Page_PreInit event procedure.
D. You need to set the AutoPostBack property for ListBox1 to true.
Correct Answer: D
QUESTION 67
Which DataSource control can be used to bind a GridView control to an
ADO.NET DataReader?
A. ObjectDataSource
B. EntityDataSource
C. XmlDataSource
D. SqlDataSource
Correct Answer: D
QUESTION 68
Your Web site uses a code file that defines business objects. One of the
business objects implemented is likely to change. You need to ensure that the
code file defining the business objects is automatically recompiled the first
time it is used after being modified. Where should you store the file?
A. Global assembly cache (GAC)
B. App_GlobalResources folder
C. bin folder
D. App_Code folder
Correct Answer: D
QUESTION 69
You are creating a custom control that will be used on ASP.NET Web pages.
The control allows the user to select a style from a drop-down list. You need
to ensure that the style the user selects is preserved between postbacks. The
page developer must not be able to disable this functionality. Which state
management mechanism should you use to store the selected style?
A. Control state
B. Application state
C. View state
D. Session state
Correct Answer: A
QUESTION 70
You add a ListBox control and a GridView control to a form and bind each to
a different SqlDataSource control. The GridView control should display a
result set filtered by the value selected in the ListBox control. What type of
parameter should you define for the WHERE clause of the data source bound
to the GridView control?
A. QueryStringParameter
B. ControlParameter
C. FormParameter
D. CookieParameter
Correct Answer: B
QUESTION 71
You are creating a Web application. The application accesses files that are
protected using NTFS permissions. Only users who are granted the necessary
file permissions should be allowed to access them. You need to configure
authentication for the Web application. Which markup should you use?
A. <system.web>
<authentication mode="Windows"/>
<identity impersonate="false"/>
</system.web>
B. <system.web>
<authentication mode="Forms"/>
<identity impersonate="true"/>
</system.web>
C. <system.web>
<authentication mode="Windows"/>
<identity impersonate="true"/>
</system.web>
D. <system.web>
<authentication mode="Forms"/>
<identity impersonate="false"/>
</system.web>
Correct Answer: C
QUESTION 72
You have designed a Web site that uses an application variable as a hit
counter to record the number of visitors to the site. You need to make sure
that only one user can increment the hit counter at a time. What should you
do?
A. Lock the Application object, increment the hit counter, and then clear the
Application object.
B. Clear the Application object and then increment the hit counter.
C. Unlock the Application object, increment the hit counter, and then lock the
Application object.
D. Lock the Application object, increment the hit counter, and then unlock
the Application object.
Correct Answer: D
QUESTION 73
One purpose of IIS application pools is to:
A. group together Web applications that have hyperlinks to each other.
B. prevent memory leaks.
C. prevent an unstable Web application from affecting other Web applications.
D. link Web applications that have related functionality.
Correct Answer: C
QUESTION 74
You store a setting in the <appSettings> section of the Web.config file. You
need to retrieve the value of the setting in a server-side event procedure.
Which object should you use?
A. ConfigurationManager
B. Application
C. Server
D. FileSystem
Correct Answer: A
QUESTION 75
The Cache property of the HttpContext object stores data that:
A. can only be accessed by code in the Global.asax file.
B. is shared only between requests within the same session.
C. is shared only between sessions initiated by a specific user.
D. is shared between all sessions of an application.
Correct Answer: D
QUESTION 76
Which HTTP error code is associated with an internal server error?
A. HTTP Error 500
B. HTTP Error 400
C. HTTP Error 503
D. HTTP Error 404
Correct Answer: A
QUESTION 77
You are creating an ASP.NET application. You are writing an event procedure
that retrieves data from an external database. The event procedure must
iterate through the retrieved data and modify records that meet certain
conditions. You need to select the objects you will use. What should you use?
A. Command and DataSet
B. DataSet and DataReader
C. DataAdapter and DataSet
D. DataAdapter and DataReader
Correct Answer: C
QUESTION 78
You want to bind the Text property of a label on a Web page to a value in a
database from a field named SuggestionDate. The value does not need to be
updatable. The approach you use should make the most efficient use of server
resources. Which syntax should you use?
A. Text=’<%# Eval("SuggestionDate") %>’
B. Text=’<%= Bind("SuggestionDate") %>’
C. Text=’<%= Eval("SuggestionDate") %>’
D. Text=’<%# Bind("SuggestionDate") %>’
Correct Answer: A
QUESTION 79
You need to ensure that only one radio button can be selected in a group.
What should you do?
A. Set the ValidationGroup property of the RadioButton controls to the same
value.
B. Set the GroupName property of the RadioButton controls to the same value.
C. Set the Text property of the RadioButton controls to the same value.
D. Set the Checked property of the RadioButton controls to the same value.
Correct Answer: B
QUESTION 80
Which two controls allow users to select one or more options from a list of
options? (Each correct answer presents a complete solution. Choose two.)
A. <asp:BulletedList>
B. <asp:ListBox>
C. <asp:RadioButtonList>
D. <asp:DropDownList>
E. <asp:CheckBoxList>
Correct Answer: BE
QUESTION 81
User input should always be validated by an ASP.NET validation control or
server-side processing because:
A. JavaScript can be turned off by the client, rendering client-side validation
ineffective.
B. Server-side processing is the preferred method of validating user input.
C. Client-side scripting languages are generally ineffective.
D. Client-side validation requires more resources than server-side validation.
Correct Answer: A
QUESTION 82
You need to ensure that the date typed in the <asp:TextBox> control named
txtEnd is later than the date typed in the <asp:TextBox> control named
txtStart. Which built-in control should you use?
A. RegularExpressionValidator
B. DateValidator
C. CompareValidator
D. RangeValidator
Correct Answer: C
QUESTION 83
Which is the correct query string syntax for passing the values red for color1,
yellow for color2, and blue for color3?
A. ?color1=red;color2=yellow;color3=blue;
B. ?color1=red&color2=yellow&color3=blue
C. ?color1=red&color2=yellow&color3=blue;
D. ?color1:red;color2:yellow;color3:blue
Correct Answer: B
QUESTION 84
You call the following AJAX function when an <asp:Button> control is clicked:
function HelloWorld() {
document.body.insertAdjacentHTML(‘beforeEnd’, ‘Hello World! ‘); }
Which property should you specify for the button to ensure that the
HelloWorld function is executed when the button is clicked?
A. OnClientClick="HelloWorld"
B. OnClientClick="Hello World()"
C. OnClick="HelloWorld()"
D. OnClientClick="HelloWorld()"
Correct Answer: D
QUESTION 85
A Web site has a page that must be translated to different languages. The
translated text should only be accessible by that page. Where should you store
the files that contain the translated text?
A. App_GlobalResources folder B. App_Code folder
C. App_Data folder D. App_LocalResources folder
E. App_WebReferences folder
Correct Answer: D
QUESTION 86
In which folder of an ASP.NET Web application should you place compiled
assemblies that you want to reference in the application?
A. The App_LocalResources folder
B. The Bin folder
C. The App_Code folder
D. The App_Data folder
Correct Answer: B
QUESTION 87
You are creating a Web application that connects to an external database.
When developing the application, the database will be located on the
development computer. After the application is deployed, the database will be
located on a different server. You need to ensure that the connection string
can be changed without recompiling the application. Where should you store
the connection string?
A. Global.asax
B. Machine.config
C. Web.config
D. MasterPage.master
Correct Answer: C
QUESTION 88
You are planning to use an ObjectDataSource control to bind a GridView to a
collection. You need to enable the user to limit the results displayed to those
that have a Salary property value within a specific range. Which property
should you set?
A. Where
B. SelectMethod
C. SelectCommand
D. FilterExpression
Correct Answer: D
QUESTION 89
The RegisterAsyncPostBackControl method of the <asp:ScriptManager>
control:
A. is used to register controls that are in a parent <asp:UpdatePanel>
container for asynchronous postback.
B. can only be called if the ChildrenAsTriggers property of the
<asp:UpdatePanel> is set to true.
C. is used to register controls that are in a child <asp:UpdatePanel> container
for asynchronous postback.
D. is used to register controls that are not in an <asp:UpdatePanel> container
for asynchronous postback.
Correct Answer: D
QUESTION 90
Which two of the following are JavaScript comments? (Each correct answer
presents part of the solution. Choose two.)
A. //This is a comment
B. /* This is a comment */
C. // This is a comment //
D. ‘This is a comment
E. <!– This is a comment –>
Correct Answer: AB
QUESTION 91
What does Windows Communication Foundation (WCF) use to describe the
data that can be exchanged between a WCF client and a WCF service?
A. The Web.config file
B. A DataSource Control
C. A data contract
D. The Publish Web Site tool
Correct Answer: C
QUESTION 92
Which object can be populated by calling the Fill method of a DataAdapter?
A. DataSet
B. SqlDataSource
C. DataReader
D. LinqDataSource
Correct Answer: A
QUESTION 93
Which method should you use to prevent pending changes from being
committed to a database for a database transaction that is already in
progress?
A. The Rollback method of the Transaction object
B. The BeginTransaction method of the Connection object
C. The Commit method of the Transaction object
D. The Kill method of the Process object
Correct Answer: A
QUESTION 94
You are developing a Web page in which you have two UpdatePanel controls.
When a user makes a selection from a DropDownList control in the first
UpdatePanel control, you want the information in the second UpdatePanel
control to be updated. Which setting is necessary to trigger the update in the
second UpdatePanel control?
A. The AutoPostBack property must be set to True on the DropDownList
control in the first UpdatePanel control.
B. The ChildrenAsTriggers property must be set to True on the first
UpdatePanel control.
C. The ChildrenAsTriggers property must be set to True on the second
UpdatePanel control.
D. The AutoPostBack property must be set to True on the first UpdatePanel
control.
Correct Answer: A
QUESTION 95
A Web application project:
A. is compiled in full the first time a page is accessed.
B. must be compiled before it is published to the Web server.
C. does not compile a page unless it is accessed.
D. must be manually compiled after the files have been published to the Web
server.
Correct Answer: B
QUESTION 96
Connection pooling:
A. allows you to reuse available connections for data requests.
B. always allows an infinite number of connections to a database.
C. allows multiple users to use the same connection at the same time.
D. can impede the performance of a Web application and should be avoided
at all costs.
Correct Answer: A
QUESTION 97
You are creating an ASP.NET application. You add an <asp:Button> control
to a page. When the user clicks the button, the following should occur:
Ÿ Execution of the current page should end.
Ÿ The newStory.aspx page should start executing in the user’s browser.
You need to write the most efficient code to implement the functionality.
Which code should you use?
A. Server.Transfer("newStory.aspx");
B. Response.Redirect("newStory.aspx");
C. Server.TransferRequest("newStory.aspx");
D. Response.Redirect("newStory.aspx", true);
Correct Answer: A
QUESTION 98
You are creating a Web application. You need to ensure that errors with the
HTML status code 500 display a Web page named 500error.aspx. What should
you do?
A. Set the ErrorPage property of the Master page.
B. Add an <error> element inside the <customErrors> element in the
Web.config file.
C. Define the 500 attribute of the <customErrors> element in the Web.config
file.
D. Add a <listener> element inside the <trace> element in the Web.config file.
Correct Answer: B
QUESTION 99
You need to enable tracing for an individual page in a Web application. What
should you do?
A. Include an @ Page directive at the top of the .aspx file that includes a Trace
attribute with its value set to false.
B. Include an @ Page directive at the top of the .aspx file that includes a Trace
attribute with its value set to Page.
C. Include an @ Page directive at the top of the .aspx file that includes a Trace
attribute with its value set to LocalOnly.
D. Include an @ Page directive at the top of the .aspx file that includes a Trace
attribute with its value set to true.
Correct Answer: D
QUESTION 100
Which tool precompiles and copies a Web site to a Web server?
A. Copy Web Site
B. Publish Web Site
C. FTP Web Site project
D. Setup project
Correct Answer: B
QUESTION 101
You want to bind an input field on a Web form to a value in a database field
named LastName. You want the user to be able to update the field in case his
or her name is misspelled. Which syntax should you use?
A. <%= Bind("LastName") %>
B. <%# Eval("LastName") %>
C. <%# Bind("LastName") %>
D. <%# Bind("LastName") %>
Correct Answer: C
QUESTION 102
Connections can only share a connection in the connection pool if:
A. they are established within the same session.
B. they are established within the same using block.
C. they issue the same SELECT query.
D. they use an identical connection string.
Correct Answer: D
QUESTION 103
Which event occurs after view state has been loaded, but before any control
events?
A. Page_Load()
B. Page_SaveStateComplete()
C. Page_PreInit()
D. Page_PreRender()
Correct Answer: A
QUESTION 104
Which object should you use to stop the execution of the code in a Web page?
A. Application object
B. Server object
C. Request object
D. Response object
Correct Answer: D
QUESTION 105
You are adding a Web page to an application that will enable users to change
their password. You need to display a message about password requirements
when the page loads initially. When the user submits the form, you want to
display a message indicating whether or not the password was successfully
changed. You need to determine whether the page has been sent to the server.
Which property should you test for?
A. Page.IsPostBack
B. Page.IsCallback
C. Page.PreviousPage
D. Page.IsCrossPagePostBack
Correct Answer: A
QUESTION 106
Your application includes the following XML document:
<? xml version="1.0" ?>
<Customers>
<Customer type="Preferred">Bill Smith</Customer>
<Customer type="Standard">Tony Ward</Customer>
</customers>
Which statement describes the XML?
A. The XML is invalid because the end tag for the <Customers> element
does not match the start tag.
B. The XML is invalid because the <Customers> element can only
contain a single <Customer> element.
C. The XML is invalid because the values "Bill Smith" and "Tony Ward"
contain spaces.
D. The XML is valid and well-formed.
Correct Answer: A
QUESTION 107
If AutoEventWireup is set to true, then:
A. your page will throw an exception.
B. it changes which lifecycle stages are executed during a postback.
C. you are NOT required to explicitly bind event handlers to a page event.
D. you are required to explicitly bind event handlers to a page event.
Correct Answer: C
QUESTION 108
You need to enable tracing for a Web application. The trace information
should be visible at the bottom of all of the application’s Web pages when you
access them from the server, but it should not be visible to users who connect
to the site from another computer. Which element should you add to the
<system.web> element of the Web.config file?
A. <trace enabled="true" localOnly="true" pageOutput="false" />
B. <trace enabled="true" localOnly="false" pageOutput="true" />
C. <trace enabled="true" localOnly="true" pageOutput="true" />
D. <trace enabled="false" localOnly="true" pageOutput="true" />
Correct Answer: C
QUESTION 109
Which statement about accessing Request.QueryString without specifying an
index is true?
A. If a specified variable is not assigned a value, an empty collection is
returned.
B. If a specified variable has multiple values, an exception is thrown.
C. If a specified variable is not assigned a value, an exception is thrown.
D. If a specified variable has multiple values, only the first value for the
specified variable is returned.
Correct Answer: A
QUESTION 110
Your Web application displays data from an Oracle database in a GridView
control. You want to allow users to update the data displayed in the GridView
control. Which of the following should you use? (Each correct answer presents
part of the solution. Choose two.)
A. An XmlDataSource control B. A SqlDataSource Control
C. The Bind method D. The Eval method
Correct Answer: BC