To use a ASP.net UpdatePanel control with a master page

Source: Internet
Author: User

Any asp.net page that contains a UpdatePanel control also requires a ScriptManager control. To use the UpdatePanel control with a master page, you can place the ScriptManager control on the master page. In this case, the master page provides a ScriptManager control for each content page. If you do not want to enable partial-page updates for individual content pages, you can disable partial-page updates for those pages.

You can also place the ScriptManager control on each content page. You might want to do this if only some content pages will contain UpdatePanel controls.

Prerequisite

To implement these procedures in your own development environment, you need to:

Visual Web Developer Express Edition or Microsoft Visual Studio 2005.

An AJAX-enabled ASP.net web site.

Add a UpdatePanel control to a content page

Create a new master page and switch to Design view.

In the AJAX Extensions tab of the Toolbox, double-click the ScriptManager control to add it to the page. Make sure that the ScriptManager control is added outside the ContentPlaceHolder control.

Outside the ContentPlaceHolder control, add the Text "Master Page".

From the HTML tab of the Toolbox, drag the horizontal rule element to the back of the text.

Create a content page for the master page.

In Solution Explorer, right-click the name of the project, and then click Add New Item. In the Add New Item dialog box, select the Select master Page check box, and then click OK.

Within the content control, type the text content page, and then add the UpdatePanel control from the Toolbox.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.