Книга: C# 2008 Programmer
AJAX- Enabling a Page Using the ScriptManager Control
AJAX- Enabling a Page Using the ScriptManager Control
Now let's use some of the core AJAX controls in ASP.NET 3.5 to AJAX-enable the sample project created earlier in this chapter.
The first step toward AJAX-enabling an ASP.NET web page is to add the ScriptManager
control to the page. That's the control that manages all the AJAX functionality on your page. It should be placed before any AJAX controls, so it's a good idea to place it at the top of the page, like this:
<body>
<form runat="server">
<div>
<asp:ScriptManager runat="server">
</asp:ScriptManager>
Display titles by publisher:
<asp:DropDownList
ID="DropDownList1"
runat="server"
DataSourceID="LinqDataSource2"
DataTextField="pub_name"
DataValueField="pub_id"
AutoPostBack="True">
</asp:DropDownList>
...
To place the ScriptManager
control on the page, you can either type it manually or drag the ScriptManager
control from the Toolbox and drop it onto the code editor.
- The DISPLAY Processor
- Page size
- Page buffers
- Next header page
- 4.4.4 The Dispatcher
- Introduction to Microprocessors and Microcontrollers
- About the author
- Chapter 7. The state machine
- Appendix E. Other resources and links
- Caveats using NAT
- Example NAT machine in theory
- Using Double Quotes to Resolve Variables in Strings with Embedded Spaces