First install ASP.net AJAX Extensions This feature is the Client-side feature that provides. NET 2.0 development Ajax
Next, install the Microsoft ASP.net 2.0 AJAX templates for Visual Studio 2008 Template Suite
This allows you to select an Ajax template in vs2008
However, you must modify the Web.config settings to specify a specific component version
The easiest way to do this is to create a new AJAX page and then copy the Web.config content from the old page without adding some overlay.
Add the following settings
Copy CodeThe code is as follows:
<pages>
<controls>
<add tagprefix= "asp" namespace= "System.Web.UI" assembly=, System.Web.Extensions, version=1.0.61025.0 Neutral, publickeytoken=31bf3856ad364e35 "/>
</controls>
</pages>
Next Join
Copy CodeThe code is as follows:
<compilation debug= "true" strict= "false" explicit= "true" >
<assemblies>
<add assembly= "System.Web.Extensions, version=1.0.61025.0, culture=neutral, publickeytoken=31bf3856ad364e35"/ >
<add assembly= "System.Web.Extensions.Design, version=1.0.61025.0, Culture=neutral, publickeytoken= 31bf3856ad364e35 "/>
</assemblies>
</compilation>
Create a new page and copy the following code:
Copy CodeThe code is as follows:
<form id= "Form1" runat= "Server" >
<asp:scriptmanager id= "ScriptManager1" runat= "Server"/>
<div>
<asp:updatepanel id= "UpdatePanel1" runat= "Server" >
<ContentTemplate>
<label runat= "Server" id= "Labletime" >
</label>
<% =datetime.now.tostring ()%>
<asp:button id= "Button3" runat= "Server" text= "Update"/>
<asp:timer id= "Timer1" runat= "Server" interval= "1000" >
</asp:Timer>
</ContentTemplate>
<Triggers>
<asp:asyncpostbacktrigger controlid= "Button2" eventname= "click"/>
</Triggers>
</asp:UpdatePanel>
<br/>
<% =datetime.now.tostring ()%>
<asp:button id= "Button2" runat= "Server" text= "Update"/>
<asp:button id= "Button1" runat= "Server" text= "Update"/>
</div>
</form>
Background:
Copy CodeThe code is as follows:
protected void button2_click (object sender, EventArgs e)
{
Labletime.innertext = DateTime.Now.ToString ();
}
Run, the successful implementation of no refresh.