Template Kits
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 Code code 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 Code code 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 Code code 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" onclick= "Button2_Click"/>
<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" onclick= "Button2_Click"/>
<asp:button id= "Button1" runat= "Server" text= "Update"/>
</div>
</form>
Background:
Copy Code code as follows:
protected void button2_click (object sender, EventArgs e)
{
Labletime.innertext = DateTime.Now.ToString ();
}
Run, the successful implementation of no refresh.