Hi, I have a form with a drop down list that is bound from a database. The last option in the ddl is "Add another Type", in order that the user can add to the list.
My idea was to have a panel which is invisible. If the user chooses "Add another type" the panel becomes visible. They enter the value they want to add into a textbox on the panel and on clicking a submit button (also on the panel) the value is added to the database, the panel disappears and the ddl is rebound.
Initially I got the page working fine, but without the ddl being rebound. I thought rather than refreshing the whole page, I would put the ddl into an updatePanel and refresh it only.
When I now select "Add another type" from the ddl, nothing changes on the page. The panel remains invisible. From debugging messages I have put into the code, I can see that there is a page postback and I can see that the ddl. selectedIndexChanged event if firing, but the code within it (panel1.visible=true) doesn't appear to be executing.
My idea was to have a panel which is invisible. If the user chooses "Add another type" the panel becomes visible. They enter the value they want to add into a textbox on the panel and on clicking a submit button (also on the panel) the value is added to the database, the panel disappears and the ddl is rebound.
Initially I got the page working fine, but without the ddl being rebound. I thought rather than refreshing the whole page, I would put the ddl into an updatePanel and refresh it only.
When I now select "Add another type" from the ddl, nothing changes on the page. The panel remains invisible. From debugging messages I have put into the code, I can see that there is a page postback and I can see that the ddl. selectedIndexChanged event if firing, but the code within it (panel1.visible=true) doesn't appear to be executing.