You can, for instance, capture the message of the exception
and dynamically set it to the AsyncPostBackErrorMessage property among other desired
logic to handle the error:
protected void ScriptManager1_AsyncPostBackError(object sender,
AsyncPostBackErrorEventArgs e)
{
ScriptManager1.AsyncPostBackErrorMessage = e.Exception.Message;
//Implement further error handling logic
}
This concludes the tour of the ScriptManager control. In the rest of this chapter, we??™ll
look at the other server-side controls offered by the ASP.NET AJAX framework. In the next
chapter, we??™ll revisit this control through several examples.
CHAPTER 5 ?– INTRODUCING SERVER CONTROLS IN ASP.NET AJAX 89
Introducing the ScriptManagerProxy Control
The ScriptManagerProxy control is available as an additional script manager for a page.
It also allows for custom authentication services through its AuthenticationService property
and profile services through the ProfileServiceManager property. Because only one
ScriptManager control is allowed per ASP.NET page, if you use master and content pages,
you cannot place additional ScriptManager controls on any of the content pages.
Pages:
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162