Currently, my form does not commit the final execution (IsPostBack section)until all values are properly entered and the submit button is clicked. How do I populate DDL_B (ddlManagers) when I select/onchange a value from DDL_A (ddlCompanies)? There's 2 ways I cud think of:
(1) Populate server-side values (Manager) to client side javascript array & use client-side onchange method -or-
(2) If I can distinguish the autopostback for Submit button -vs- DDL_A Companies, then I can implement the proper code inside the IsPostBack section (the Else section).
---------------------------------------------------------
<script runat="server">
Sub Page_Load
If Not IsPostBack Then
ddlCompanies = list from db tbl_Company
ddlManagers = blank form for now
Else
Insert data into db tbl_Registration
End If
End sub
</script>
<form runat="Server">
<asp:Textbox id="tbxNewUserName" runat="server"></asp:Textbox>
<aspropDownList id="ddlCompanies" runat="server"></aspropDownList>
<aspropDownList id="ddlManagers" runat="server"></aspropDownList>
<asp:Button id="Button1" runat="server" Text="Submit"></asp:Button>
</form>
(1) Populate server-side values (Manager) to client side javascript array & use client-side onchange method -or-
(2) If I can distinguish the autopostback for Submit button -vs- DDL_A Companies, then I can implement the proper code inside the IsPostBack section (the Else section).
---------------------------------------------------------
<script runat="server">
Sub Page_Load
If Not IsPostBack Then
ddlCompanies = list from db tbl_Company
ddlManagers = blank form for now
Else
Insert data into db tbl_Registration
End If
End sub
</script>
<form runat="Server">
<asp:Textbox id="tbxNewUserName" runat="server"></asp:Textbox>
<aspropDownList id="ddlCompanies" runat="server"></aspropDownList>
<aspropDownList id="ddlManagers" runat="server"></aspropDownList>
<asp:Button id="Button1" runat="server" Text="Submit"></asp:Button>
</form>