Hi guys,
I just cannot get AJAX Update panel to perform as I expect.
I am in VS2008, a new ASP.NET website,
add a ScriptManager
add an UpdatePanel
Inside Update Panel, add a button
In the buttons OnClick() event, add the following
Button1.Text = DateTime.Now.ToString();
Problem:
Every time I press the button, I get a full postback!!!
I have tried lots of examples from the web and get full postbacks on all of them. I am using the built in webserver with VS2008
Update: Just noticed also, that for a micro second I get the "Done but with Errors on Page" flash in the status bar. I can also run demo AJAX pages from websites without fault.
Can anyone point me in a direction to investigate ? Full code to webform below.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm3.aspx.cs" Inherits="WebApplication1.WebForm3" %>
<%@ Register assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI" tagprefix="asp" %>
<!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><
html xmlns="http://www.w3.org/1999/xhtml" ><
head runat="server"><title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
</div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
</ContentTemplate>
</asp:UpdatePanel>
</form>
</body>
</html>
Thanks
Mike
Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.