Hi kojoh,
Have your problem resolved yet? I have wrote a sample and it works fine in my pc.You can wholly copy the code into a blant page.Hope it helps.
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Reflection" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
//use refrection to register a asyncpost button here.
private static MethodInfo triggerInitMethod = typeof(UpdatePanelTrigger).GetMethod("Initialize", BindingFlags.NonPublic | BindingFlags.Instance);
protected void Page_Load(object sender, EventArgs e)
{
AsyncPostBackTrigger trigger = new AsyncPostBackTrigger();
trigger.ControlID = this.Button1.UniqueID;
trigger.EventName = "Click";
this.UpdatePanel1.Triggers.Add(trigger);
if (ScriptManager.GetCurrent(this).IsInAsyncPostBack)
{
triggerInitMethod.Invoke(trigger, null);
}
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<%=DateTime.Now.ToString() %>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<%=DateTime.Now.ToString() %>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<asp:Button ID="Button1" runat="server" Text="Button" />
</form>
</body>
</html>
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.