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 225 | Next

Robin Pars, Laurence Moroney, and John Grieb

"Foundations of ASP.NET AJAX"

In the SampleWebSite
project that you saw earlier, there is also an excellent example for the DragPanelExtender
control found in DragPanel.aspx. Before looking at the code, run the page, and drag the
panel around to see how nicely it works (see Figure 7-18).
CHAPTER 7 ?–  USING THE ASP.NET AJAX CONTROL TOOLKIT (PART 1) 159
Figure 7-18. DragPanel control in action
When you view the ASPX markup for this page, you??™ll see a few nested Panel controls
and the DragPanel control:
style="z-index: 20;">
BorderStyle="Solid" BorderWidth="2px" BorderColor="black">
Drag Me


Style="overflow: scroll;" BackColor="#0B3D73"
ForeColor="whitesmoke" BorderWidth="2px" BorderColor="black"
CHAPTER 7 ?–  USING THE ASP.NET AJAX CONTROL TOOLKIT (PART 1) 160
BorderStyle="Solid" >

This panel will reset its position on a postback or
page refresh.




<%= GetContentFillerText() %>







TargetControlID="Panel6" DragHandleID="Panel7" />
The key thing to note is that Panel6 was set as the TargetControlID because it is the
topmost panel and contains all the content, whereas Panel7 is being assigned to the
DragHandleID because it makes up the top part of the panel and the ideal point for the
user to drag.


Pages:
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237