• 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/34

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;

34 Cards in this Set

  • Front
  • Back
Which command can you use to find out if the page postback is from an Asynchronous postback
ScriptManager.IsInAsyncPostback
How can you find out which control made the Async postback?
ScriptManager.AsyncPostbackSourceElementID
If the update panel hijacks the postback request and turns it into Async, does this mean the page does not have to go through a full cycle during Async postback?
The page does goes through a full life cycle of page post back
Which two things does an update panel inject into the page after an Async postback?
The updated contents within the update panel
ViewState for controls within the update panel
Which two .NET classes of the SYS namespace provide the framework for issuing asynchronous PosBacks?
Sys.WebForms.PageRequestManager
Sys.Applications
Using ScriptManager, how do you create a proxy to an Ajax enabled web service?
<Services>
------<asp:ServiceReference Path="~/WeatherService.svc"
</Services>
Under ScriptManager markup, how do you specify a reference to a custom Javascript file
<Services>
------<asp:ServiceReference Path="~/Scripts/MyCustomCode.js"
</Services>
Instead of developing a web service, how can you enable your aspx page to dispatch calls to a page asynchronously?
<asp:ScriptManager EnablePageMethod="true" />

Decorate the method with the [WebMethod] attribute

Invoke method using PageMethod class:
PageMethod.MethodName( );
When making asynchronous calls how can you cancel the process in the middle?
Sys.WebForms.PageRequestManager.abortPostBack()

This will discard the response from the server.
What are the 5 events raised by the PageRequestManager class after an asynchronous request has been issued?
initializeRequest
beginRequest
pageLoading
pageLoaded
endRequest
What are the 3 events raised by Sys.Applciations? Which event initiates the postback events of the PageRequestManager class?
init
load - initiates events of PageRequestManager
unload
Which 3 events do you implicitly get in your script due to the presence of the ScriptManager control?
pageInit (sender)
pageLoad (sender, args)
pageUnload (sender, args)
What are the steps involved in an asynchronous postback using updatePanel?
1. XMLHttpRequest is generated to the server

2. Server processes the request going through a full page life cycle and renders the output HTML

3. XMLHttpRequest extracts the HTML delta and sends to the client.

4. Client injects the received HTML into the DOM
How does the updatePanel behave if the client does not support asynchronous postBacks?
It falls back to normal postback
How can you specify that the UpdatePanel renders its contents within a div or a span?
RenderMode = "Block" generates div

RenderMode="Inline" generates span
What's the default update mode for updatePanels?
What can you change it to?
UpdateMode = "Always"

change to:
UpdateMode="Conditional"
If a page has 3 update panels with their default settings, what happens to the other two panels when the third panel issues a postback?
By default UpdateMode="Always". Therefore all update panels get updated by the postback.
How can you programmatically make an updatePanel fire an asynchronous postback using a control residing outside the control panel?
Call updatePanel.Update() method

Condition:
UpdateMode="Conditional"
ChildrenAsTriggers = "false"
How can you prevent controls within an update panel from triggering a postBack request?
Set ChildrenAsTriggers = "false"
What type of triggers can be specified in the <Triggers> collection of an update panel?
What two attributes do these triggers take?
<asp:AsynchronousPostBackTrigger />
<asp:PostBackTrigger/>

ControlID
EventName
How can you have a control inside an update issue a standard postback?
Add it to the <Triggers> collection using a <asp:PostBack/> trigger
How can you have an external control issue an asynchronous postback for an update panel?
Add it to the <Triggers> collection using a <asp:AsynchronousPostBack/> trigger
What's the requirement for using Nested update panels?
UpdateMode property must be set to "Conditional"
If nested update panels are configured correctly, how will the behave when triggering asynchronous postbacks?
Outer panel will update all child panels but not parent panels
Which binding is used by JavaScript callable WCF services?
WebHttpBinding
What's the data format used by JavaScript callable WCF services?
JSON
When using JavaScript callable WCF services, what argument should be specified in the [ServiceContract] attribute?
unique namespace

[ServiceContract(Namespace = "http://www.pluralsight.com/ws/")]
When using JavaScript callable WCF services, what three things that need to be set in the web.config file?
Set enableWebScript

Set aspNetCompatibilityEnabled = "true"

Use WebHttpBinding
When using JavaScript callable WCF services, what two callback methods does the client side JavaScript proxy provide?
What argument does it provide for each callback method?
OnSuccess (result, userData)
-------- userData would be the last argument provided in the request

OnFailure (err)
Instead o using the ScriptManager control, how can you programmatically create a proxy for a WCF service endpoint ?

When is the proxy JavaScript file sent back to the client?
Specify the JS paramater in script when referencing the endpoint

<script src="StockQuoteService.svc/js" />

the proxy JavaScript file sent back to the client at runtime
How can you modify the behavior of a WCF method to return data as XML instead of JSON?
by using the WebInvoke(ResponseFormat=WebMessageFormat.Xml) with the OperationContract attribute.
What three client side Ajax Extensions classes are provided by the Microsoft AJAX framework for Asynchronous request?
MicrosoftAjax.js
MicrosoftAjaxWebForms.js
MicrosoftAjaxTimer.js
How can you combine scripts to decrease round-trips and improve efficiency?
By using <CompositeScript>

<asp:ScriptManager>
----<CompositeScript>

--------<asp:ScriptReference name="MicrosoftAjax.js"/>
--------<asp:ScriptReference name="MicrosoftAjaxWebForms.js"/>
--------<asp:ScriptReference name="MicrosoftAjaxTimer.js"/>

----<CompositeScript>
<asp:ScriptManager>
What object does the PageRequestManager class provide to reference a server control in JavaScript?
$get ("ServerControlID");