The problem is described in the title. It does postbacking also when I specifically set AutoPostBack property of the ListBox to false, though it should be like that by default.
ListBox selection mode is set to multiple.
There is a similar question but with a different background.
What am I missing? Is this some well known issue?
Thank you for replying,
please tell if you need the exact code
EDIT:
Here’s the aspx page. Codebehind is much larger, since this page is the target of redirection, please tell if you need additional info from there.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ReportsPreviewViewAddParams.aspx.cs" Inherits="Admin_ReportsPreviewViewAddParams" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
</head>
<body>
<form runat="server">
<asp:HiddenField ID="SqlSelect" runat="server" />
<asp:HiddenField ID="SqlColumnSize" runat="server" />
<asp:HiddenField ID="SqlGroup" runat="server" />
<asp:HiddenField ID="SqlOrder" runat="server" />
<asp:HiddenField ID="PageSize" runat="server" />
<asp:HiddenField ID="SumColumns" runat="server" />
<asp:Repeater ID="RepeaterInput" runat="server" OnItemDataBound="OnRepeaterItemDataBound" >
<HeaderTemplate>
<table>
<tr><th>
<asp:Label ID="LabelHeader" runat="server" Text='<%# Webcom.Configurator.Core.MLPersistentManager.GetKeyValue("Admin.Reports.EnterParams") %>' />
</th></tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td>
<asp:TextBox ID="TextBoxValueOne" runat="server" AutoPostBack="false" />
<asp:ListBox ID="ListBoxControlOne" runat="server" AutoPostBack="false" />
</td>
<td><asp:Label ID="LabelOperatorOne" runat="server" /></td>
<td><asp:Label ID="LabelColumnName" runat="server" /></td>
<td><asp:Label ID="LabelOperatorTwo" runat="server" /></td>
<td>
<asp:TextBox ID="TextBoxValueTwo" runat="server" AutoPostBack="false" />
<asp:ListBox ID="ListBoxControlTwo" runat="server" AutoPostBack="false" />
</td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
<asp:Button ID="buttonSubmit" runat="server" Visible="true" OnClick="OnSubmit" />
</form>
</body>
</html>
The repeater does not have a way of tracking autopostbacks that happen from controls within the repeater. This may offer you a clue:
Handling autopostbacks within a repeater
You could try initializing the AutoPostBack property early in the code-behind page life-cycle, perhaps in Page Load method (after page controls have been created):