B
benji
Hi,
I'm using ASP.NET 3.5 SP1, and I've managed to get a sample app that
reproduces some very odd behavior. Let me describe:
There is an updatepanel with a few controls. Among them, a button.
1) The button should cause an async postback, but if you hit the button
immediately after loading, you get a full page refresh.
2) If you hit a radiobutton first, you will correctlyg get an async
postback. However, you will then get a SECOND copy of the same button
generated in the web browser. Now with these two buttons, the behavior is
different. The top one (dynamically generated during the async postback)
correctly triggers an async postback when pressed. The bottom button, just as
originally, still causes a full page postback.
Could someone please help me understand this?
Thanks!
-Ben
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb"
Inherits="RCHTemplatesManager.WebForm1" %>
<!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 id="Head1" runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:RadioButtonList ID="TemplateTypeRBList"
AutoPostBack="true" RepeatDirection="Horizontal"
runat="server">
<asp:ListItem Text="Type 2 Template" Value="Type2" />
<asp:ListItem Text="Type 1 Template" Value="Type1" />
</asp:RadioButtonList>
<aspropDownList ID="DropDownList1"
runat="server" AutoPostBack="True">
<asp:ListItem>Item1</asp:ListItem>
<asp:ListItem>Item2</asp:ListItem>
</aspropDownList>
</div>
<asp:Label Text="Test" runat="server" ID="Wo" />
<asp:Button ID="Button1" runat="server" Text="Button" />
</ContentTemplate>
</asp:UpdatePanel>
</form>
</body>
</html>
I'm using ASP.NET 3.5 SP1, and I've managed to get a sample app that
reproduces some very odd behavior. Let me describe:
There is an updatepanel with a few controls. Among them, a button.
1) The button should cause an async postback, but if you hit the button
immediately after loading, you get a full page refresh.
2) If you hit a radiobutton first, you will correctlyg get an async
postback. However, you will then get a SECOND copy of the same button
generated in the web browser. Now with these two buttons, the behavior is
different. The top one (dynamically generated during the async postback)
correctly triggers an async postback when pressed. The bottom button, just as
originally, still causes a full page postback.
Could someone please help me understand this?
Thanks!
-Ben
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb"
Inherits="RCHTemplatesManager.WebForm1" %>
<!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 id="Head1" runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:RadioButtonList ID="TemplateTypeRBList"
AutoPostBack="true" RepeatDirection="Horizontal"
runat="server">
<asp:ListItem Text="Type 2 Template" Value="Type2" />
<asp:ListItem Text="Type 1 Template" Value="Type1" />
</asp:RadioButtonList>
<aspropDownList ID="DropDownList1"
runat="server" AutoPostBack="True">
<asp:ListItem>Item1</asp:ListItem>
<asp:ListItem>Item2</asp:ListItem>
</aspropDownList>
</div>
<asp:Label Text="Test" runat="server" ID="Wo" />
<asp:Button ID="Button1" runat="server" Text="Button" />
</ContentTemplate>
</asp:UpdatePanel>
</form>
</body>
</html>