I have a weird(maybe?) situation where my main page updates Prefixes and after the user click the “button” I want the c# code to update the dropdownlist which is on another page.
Problem is the DDL is on another page so I can’t reference the DDL ID which is:
<asp:DropDownList ID="PrefixID"</asp:DropDownList>
I used to have a DDL on the main page where the button was and it worked there but I decided to seperate the DDL to another page for a less cluttered interface.
@Chris – I enter in a Prefix like HJG and click the button to add it to a list like in an array. Yeah the Prefixes are stored in a DB. The prefixes are populated in a DDL on another page.
Only one page exists at a given moment during the serving of the user request. So I suppose that in the click handler of the button you are redirecting to the other page. And when redirecting you could send values as query string parameters:
and then in the Page_Load of the other page read the query string parameter value:
and update the dropdown list which exists on this page accordingly.