SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 158 | Next

Robin Pars, Laurence Moroney, and John Grieb

"Foundations of ASP.NET AJAX"

Also, unlike the ScriptManager, you
can actually have multiple UpdatePanel controls on the same page and even have nested
UpdatePanel controls within one another.
Using the UpdatePanel Control
To use an UpdatePanel control, you simply drag and drop it onto the design surface of
your web form (see Figure 5-5).
CHAPTER 5 ?–  INTRODUCING SERVER CONTROLS IN ASP.NET AJAX 95
Figure 5-5. Placing an UpdatePanel control on a web form
However, as you know, the UpdatePanel control cannot function without a
ScriptManager control on the page. Additionally, the ScriptManager control must be
located before any UpdatePanel controls on your page. In other words, as you read your
source code from top to bottom, the ScriptManager reference should appear before the
UpdatePanel ones. Using the Tasks Assistant will ensure that it is placed correctly. If your
ScriptManager control is not present or is incorrectly placed, you??™ll get an error when you
try to open the page in a browser (see Figure 5-6).
CHAPTER 5 ?–  INTRODUCING SERVER CONTROLS IN ASP.NET AJAX 96
Figure 5-6. Error page when the UpdatePanel and ScriptManager controls aren??™t properly
configured
The UpdatePanel control contains a designer surface where you can place HTML.


Pages:
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170