I have the following DropDownList in ASP.NET Webform
<asp:DropDownList ID="DDL_Categoria" runat="server" CssClass="form-control" AppendDataBoundItems="true" >
<asp:ListItem Value="" Selected="True">Selecione</asp:ListItem>
</asp:DropDownList>
When selecting this field, another DropDownList should automatically be completed in the form footer. What better method? Faster, politically correct?
Method 01
Code Behind + autopostback
<asp:DropDownList ... OnSelectedIndexChanged="DDL_Categoria_SelectedIndexChanged" AutoPostBack="True"
and in the code-behind I make the logic. Disadvantage: Does it load the page, if it is typing in another field can cause some delay?
Method 02:
Javascript calling in iframe. Would create a new .aspx page to receive this value
<asp:DropDownList ... onchange="nome_functionJS(this.value)"
<script>
function nome_functionJS(valor){
document.getElementById("IFRAMEID").src ='monta_DDL.aspx?value=' + valor
}
Method 03: Jquery (I have no idea how to call it)