• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/91

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

91 Cards in this Set

  • Front
  • Back
What protocol is used to communicate between the web browser and the web server?
HTTP is used for web browser and web server communication.
In ASP.NET, what does the Request object represent?
The Request object in ASP.NET wraps the communication from the web browser to the web server.
In ASP.NET, what does the Response object represent?
The Response object in ASP.NET wraps the communication from the web server to the web browser.
Where are solution files created by default?
By default, solution files are created in the My Documents\Visual Studio 2010\Projects folder.
Which ASP.NET page model separates layout from code?
The code-behind programming model separates user-interface layout markup from code.
Is the format of a configuration file CSV, XML, or binary?
The configuration file is stored in XML format.
If a setting exists in the root Web.config file and also in the Web.config file at the web application level but with a different value, which Web.config file takes precedence?
The Web.config file at the web application level takes precedence unless the setting has been configured to prevent overriding.
Which control is required when you are defining a master page?
You must have at least one ContentPlaceHolder control defined per master page.
Which control is required when you are implementing a content page?
You place Content controls on content pages. One Content control is added to the page for each ContentPlaceHolder control identified by the master page.
In which folder should you place themes for an application?
Place themes for an application in the App_Themes folder.
In which folder should you place global themes for IIS websites?
Place global themes in the <iisdefaultroot>\Aspnet_client\System_web\<version>\Themes folder.
How can you cause a cached object to be automatically invalidated after a specific amount of time?
Call the Cache.Insert method and provide a dependency.
Where is Cache data stored—in memory, on the hard disk, in a database, or on a state server?
The Cache object is stored in memory on the server.
What types of data can you store in the Cache collection?
You can store any type of data in the Cache collection. However, when you retrieve the data, you must cast it to the correct type.
What must you do before you use an object you retrieved from the Cache collection?
You must verify that the object is not null and then cast it to the correct type. If it is null, you must retrieve it from the original source rather than from the Cache.
Which event would you handle to set the value of a Label control?
Usually, you would handle the Page.Load event. Because other parts of a form probably do not rely on the value of a Label, you could also handle the Page.PreInit, Page.Init, or Page.Render event.
What happens in the Init event of a page?
Each child control of the page is initialized to its design-time value.
How do ASP.NET web forms remember the settings for controls between user requests?
View state, which is enabled by default, is used to embed control property values to be sent to the client and back again to the server.
Is the view state lost if a user refreshes a webpage? What if the user uses email to send a URL to a friend?
View state is embedded inside the HTML of a single instance of a webpage displayed in the user's browser. It is lost and rewritten when a user refreshes his or her page. If the URL is copied and sent to another user, the view state does not go along. Instead, when new users request the page, they get their own view state instance.
Which typically consumes more server memory: application state or session state?
Session state tends to use much more memory than application state because application state is shared among users, whereas session state exists on a peruser basis.
Which might not work if a user has disabled cookies in his or her web browser: application state or session state?
Session state, by default, won't work if a web browser that supports cookies has cookies disabled. Application state is not user-specific, though, and does not need to be tracked in cookies. Therefore, application state works regardless of the cookies setting.
What are the two types of web server Button controls that can be created?
submit and command buttons.
How do you create a TextBox for retrieving a password from a user?
setting the TextMode property of the TextBox control to Password.
How do you make a CheckBox cause immediate postback to the server?
by setting its AutoPostBack property to true.
f you are migrating classic ASP pages to ASP.NET, what type of server controls might you use?
Use HTML server controls for easily converting classic ASP pages to ASP.NET.
What control provides the best implementation of a schedule of specific dates?
The Calendar control provides the best implementation of a schedule of specific dates.
You want to create a webpage that prompts the user to input lots of data, and you want the data input to be spread across multiple screens. What is the best control to use to implement this solution on a single webpage?
Wizard control
Your customer wants her company's home page to contain an image of the world and require users to click their specific countries. This redirects the users to the websites for their respective countries. What control will you use?
ImageMap control
Which validation control can be used to determine whether data that is entered into a TextBox control is of type Currency?
CompareValidator control to do a data type check. Set its Operator property to DataTypeCheck and its Type property to Currency.
What control can be used to display all validation errors on a page inside a pop-up window?
ValidationSummary control can be used to show a summary of validation error messages for a page. The control can also be used as a pop-up browser window.
Which method of navigation requires the most communication between the browser and the web server?
Client-side browser redirect requires the most communication because it is a server-side method that tells the browser to request a new page, thus causing multiple calls to the server.
Why would you want to use Web Parts?
Web Parts enable users to customize the components on a page and the layout of a page. Additionally, Web Parts can automatically collect and exchange data.
Which component is required for all pages that use Web Parts?
The WebPartManager control is required for all pages that use Web Parts.
What component do you need to enable to allow a user to add new Web Parts to a page?
The CatalogZone control enables a user to add new Web Parts to a page.
In which folder should you store global resource files?
Global resources should be stored in the App_GlobalResources folder.
In which folder should you store local resource files?
Store local resources in the App_LocalResources folder.
What can you do to make a webpage more useful to users who use special displays or screen readers to make text more readable?
First, avoid specifying font sizes or using colors that might be difficult to read. Second, provide descriptions for images, tables, and forms that screen readers can use.
What can you do to make a webpage more useful to a user who does not use a mouse?
Provide access keys for all controls that require user input, and underline the access keys in associated labels. Define a logical tab order that allows the user to progress through a form by using the Tab key. Additionally, specify default buttons for forms and Panel controls.
Without writing much code, what is the easiest way to group several TextBox and Label controls that offer shared functionality so that they can be dragged onto a webpage as a unit?
Create a web user control.
What type of control can be used to provide data that is to be rendered but that allows the webpage designer to specify the layout of the data?
A templated user control can be used.
In which dialog box do you enable the ASP.NET debugger for a project?
You can enable the ASP.NET debugger from your project's Property Pages dialog box.
What is the name of the element in the Web.config file that you use to define the debug attribute to turn on debugging for your site?
You can turn on debugging by using the debug attribute of the compilation element.
How can you make trace data display on your webpage?
Set Trace="true"
What is the name of the virtual page that you can request to view trace data when the trace data is not displayed on its corresponding webpage?
The virtual page is called Trace.axd.
You want to create a new, custom web server control that does not rely on any existing ASP.NET control. From what class should you inherit?
WebControl class.
You want to create a control that can be distributed as a DLL. The control contains several TextBox, Label, and Button controls, and you want to be able to add the control to the Toolbox. What is the best choice of control to create?
Create a composite control.
You want to create a new, custom control that extends from the CheckBox control. From which class should you inherit?
CheckBox class.
What launch condition does a Web Setup Project include by default?
By default, a Web Setup Project checks for an IIS version later than 4.0.
What are the four phases of a Web Setup Project deployment?
Install, Commit, Rollback, and Uninstall are the four phases of Web Setup Project deployment.
Which of the AJAX Extensions controls allow you to display an update to a portion of a webpage?
The contents inside an UpdatePanel are updated independently of the rest of the page when a partial-page update is performed.
If you were building a user control that required ASP.NET AJAX functionality, which control would you add to the user control markup?
You would have to add a ScriptManagerProxy control to the user control to ensure that the user control can work with pages that already contain a ScriptManager control.
How do you indicate that a control outside an UpdatePanel should trigger a partial-page update to the UpdatePanel?
To connect a control that is outside an UpdatePanel to an UpdatePanel, you register it as an AsyncPostBackTrigger in the Triggers section of the UpdatePanel markup.
In JavaScript, how do you reference an ASP.NET control added to a standard ASPX webpage? How do you reference the same control added to a child ASPX page that uses a master page?
In JavaScript, you can reference the ASP.NET control added to a standard ASPX page by using its ID. If the control is added to a master page, you must use the ContentPlaceHolderID_ControlId naming convention.
Where should you place client script you intend to use across multiple pages of a site?
You should place shared script code in a .js file. This allows you to easily share the code between pages. It also allows browsers to cache this code.
What property and method of the Page object do you use to register client script dynamically from code?
Page.ClientScript.RegisterClientScriptBlock is used to dynamically register client script from code.
Which jQuery library file should you deploy with your production applications?
You should use the jquery-1.4.1.min.js file, which has been minified and thus optimized for download and performance.
How can you ensure that the browser has loaded the full content of the DOM prior to executing any jQuery code?
You can use the $(document).ready() event to execute code only after the DOM has been loaded.
How would you use jQuery to select the <div id="employeeDetails"> element?
You would use the jQuery method and pass the ID as a parameter prepended with the pound (#) symbol, as in $("#employeeDetails").
How would you pass parameters to a jQuery AJAX call?
You pass parameters to a jQuery call by enclosing them in braces and separating them as name-value pairs with a colon, as in the following:


data: "{'myParameter': 'paramValue'}",
When you are writing an HTTP handler, which method of the IHttpHandler interface should you implement to produce a response for a specific HTTP request?
You should implement the ProcessRequest method. This method will be called by ASP.NET for your registered HTTP handler.
You are running IIS 7.0 in integrated mode. You want to register an HTTP handler or module by using the Web.config file. To which configuration element do you add your handler or module?
You add the configuration information to the <system.WebServer> element when using IIS 7.0 in integrated mode.
How do you create an asynchronous HTTP handler?
You would implement the IHttpAsyncHandler interface, which would include the BeginProcessRequest and EndProcessRequest methods.
In what method would you register your application events when creating an HTTP module by using the IHttpModule interface?
You would implement the IHttpModule.Init method and use it to register your code to application events.
What type of file would you use to create an XML web service?
You would add a new ASMX file to a website to create an XML web service
What is the name of the attribute class you would apply to your web service?
You would use the WebServiceAttribute class to mark a class as an XML web service.
How can you identify a method as exposed as part of a web service?
You would use the WebMethodAttribute class to tag a method as a web method.
How do you mark a class or interface as a WCF service?
You use the ServiceContractAttribute class to tag an interface or class as a WCF service.
How do you mark methods in an interface or class so that they are exposed as part of the class's service contract?
You use the OperationContractAttribute class to tag a method as a service method.
Which attribute do you add to a WCF service to indicate that it can be called by an HTTP request that uses REST?
mark the service with the WebInvokeAttribute class.
From what class should your WCF Data Services derive?
You should derive from the DataService class found in the System.Data.Services namespace.
When writing a LINQ query against a standard DataSet, how do you access the DataTable and the column or columns you want to query against?
Because a standard DataSet is not strongly typed, you must use the DataSet.Tables and DataTable.Field properties to access the table and its columns in a LINQ query. You pass the names (as string values) to these methods
What are three ways to create an O/R map by using LINQ to SQL?
You can use the LINQ to SQL Classes template to create a DBML file and drag tables onto the design surface. You can also use the command-line tool, SqlMetal. Finally, you can code your entities manually as class files that use the System.Data.Linq.Mapping attributes to identify tables and columns.
From what class does a LINQ to Entities model inherit?
An entity model inherits from the System.Data.Objects.ObjectContext class. This class provides the mapping from an application model to a data source.
Which attribute of the SqlDataSource control do you use to define a connection to the database?
You use the ConnectionString attribute.
How do you define an ObjectDataSource to connect to a business object?
You use the TypeName attribute.
Which attribute of the LinqDataSource control do you use to indicate the O/R class used for connecting to and working with LINQ-based data?
You use the ContextTypeName attribute.
Which attribute of the EntityDataSource control do you set to indicate a default entity set for your control to expose?
You use the EntitySetName attribute.
What method should you call on a data-bound control when the data is ready to be read from the data source?
You should call the DataBind method.
What method is used in a FormView to perform two-way data binding?
The Bind method is used to perform two-way data binding.
What GUI object can provide a data source that allows you to connect middletier objects to data-bound controls?
The Bind method is used to perform two-way data binding.
What data models can you use with Dynamic Data?
Dynamic data must use a data model based on DataContext or ObjectContext. This includes LINQ to SQL classes and ADO.NET Entity Framework models.
Where do you register your data model with the site's MetaModel?
You register your data context inside the Global.asax file.
What data models can you use with Dynamic Data?
You would use the DisplayFormatAttribute.
Which control would you use to provide a logon link?
Use the LoginStatus control to provide a logon link.
Which logon controls are useful only to authenticated users?
The LoginName, ChangePassword, and LoginView controls are useful only to authenticated users.
What is the ASP.NET MVC convention for naming controller classes?
You name your controller classes after entities in your model and add the Controller suffix, as in EntityController.
What is the ASP.NET MVC convention for storing views?
A view should be stored in a folder with the same name as the controller (minus the suffix), as in Entity.
What is the ASP.NET MVC convention for naming views?
A view should be named after the action method in the controller, such as Index.aspx or Create.aspx.
What are the restrictions placed on defining a model for ASP.NET MVC?
There are no restrictions on creating a model. You can create any set of custom classes or use generated code such as an Entity Framework model.
How would you return a specific view from an action method?
You can do so by passing the view name in the View method, as in return View("Edit").
How do you indicate that an action method should be called as part of an HTTP post?
You add the HttpPostAttribute class to the action method signature.