TAILIEUCHUNG - ASP.NET 4 Unleased - p 179

Cả hai TargetControlID và DragHandleID điểm bất động sản ở Panel điều khiển. Hội đồng bên ngoài, pnlAdd, là Hội đồng mà được kéo. Hội đồng nội, pnlDrag, là Panel mà bạn nhấp chuột để kéo kiểm soát Panel bên ngoài. Khi bạn mở trang đầu tiên, Hội đồng không xuất hiện. | 1754 CHAPTER 39 Using the AJAX Control Toolkit In Listing the DragPanel extender control is declared like this ajax DragPanelExtender id dpe1 TargetControlID pnlAdd DragHandleID pnlDrag Runat server Both the TargetControlID and DragHandleID properties point at Panel controls. The outer Panel pnlAdd is the Panel that gets dragged. The inner Panel pnlDrag is the Panel that you click to drag the outer Panel control. When you first open the page the Panel does not appear. The Cascading Style Sheet CSS rule associated with the Panel hides the Panel with display none. The page includes the following link that displays the draggable Panel a href javascript void 0 onclick get lpnlAddl . lblock Add Movie a The get method is an alias for the method. When you click the link the display style for the pnlAdd Panel is set to block and the Panel and its contents appear. Using the FilteredTextBox Control The FilteredTextBox extender control enables you to prevent users from entering the wrong type of content into TextBox. You can use the FilteredTextBox extender control for example to create TextBox that accepts only numbers. The page in Listing illustrates how to use the FilteredTextBox control. The page contains two TextBox controls. The first TextBox accepts only numbers. The second TextBox accepts lowercase letters underscores and exclamation marks. LISTING @ Page Language C @ Register TagPrefix ajax Namespace AjaxControlToolkit Assembly AjaxControlToolkit DOCTYPE html PUBLIC - W3C DTD XHTML Transitional EN http TR xhtml1 DTD html xmlns http 1999 xhtml head runat server title Show Filtered TextBox title head body From the Library of Wow eBook Using the FilteredTextBox Control 1755 form id form1 runat server div asp ScriptManager ID ScriptManager1 runat server asp Label id lblNumeric Text Enter a Number AssociatedControlID txtNumeric Runat .