I have an aspx page, with an asp:DropDownList (here DropDownList_AuthenticationMode). The element has a OnSelectedIndexChanged as well, and the AutoPostBack attribute set at true.
When this dropdownlist value changes, a request starts and the function Page_Load is triggered, but not the "DropDownList_AuthenticationMode_SelectedIndexChanged" one.
IsPostBack is also always false in the Page_Load function.
I tried a lot of things without having this function triggered. The end button with the OnClick attribute launches the same thing, without triggering the GetQrCode method.
Is there something I could have forgot ?
<form id="Form1" runat="server">
<div class="rowflex" id="scrollableContent">
<div class=stepContent>
<div>
<span><asp:Literal ID="Literal_GetQrcode" runat="server"/></span>
<br/>
<br/>
<span><asp:Literal ID="Literal_FolderId" runat="server"/></span>
<br/>
<a href="../api/oauth/logout">Logout</a>
<br/>
<br/>
<span><asp:Literal ID="Literal_URL" runat="server"/></span>
<br/>
<asp:TextBox ID="TextBox_URL" runat="server" style="width: 400px; max-width: 600px"/>
<br/>
<br/>
<span><asp:Literal ID="Literal_AuthenticationMode" runat="server"/></span>
<br/>
<asp:DropDownList ID="DropDownList_AuthenticationMode" runat="server" AutoPostBack="true" onselectedindexchanged="DropDownList_AuthenticationMode_SelectedIndexChanged" style="width: 400px; max-width: 600px"></asp:DropDownList>
<br/>
<br/>
<span><asp:Literal ID="Literal_Domain" runat="server" Visible="false"/></span>
<br/>
<asp:TextBox ID="TextBox_Domain" runat="server" Visible="false" style="width: 400px; max-width: 600px"/><br/>
<br/>
<br/>
<asp:Button ID="Button_GetQrCode" runat="server" OnClick="GetQrCode" />
<br/>
<br/>
<asp:label ID="Label_GetQrCodeResult" runat="server"></asp:label>
</div>
</div>
</div>
</form>
and the cs looks like this :
protected void DropDownList_AuthenticationMode_SelectedIndexChanged(object sender, EventArgs e)
{
Literal_Domain.Visible = TextBox_Domain.Visible = (DropDownList_AuthenticationMode.SelectedItem.Text == AUTHENTICATIONMODE_NTLM);
}
I'm running out of ideas about this issue.
Thank you !