Updating listbox from code behind

NET 2.0 / SQL Server 2000 db / Visual Basic Code behind On my page I have added an SQL Datasource that contains the SQL query to retrieve the list for my Drop Down List Box.Using this SQLData Source I can retrieve my drop down list data.SELECT DISTINCT responsible Minister FROM responsible Minister WHERE language ID = @language ID ORDER BY responsible Minister ASC I have a button that I have added that calls a stored Proc to INSERT DATA into that same table BEGIN -- Find the next PK value for responsible Minister ID DECLARE @responsible Minister ID smallint SELECT @responsible Minister ID=MAX(responsible Minister ID)+ 1 FROM dbo.[responsible Minister] WHERE language [email protected] ID INSERT INTO dbo.[responsible Minister]( [responsible Minister ID], [language ID], [responsible Minister]) VALUES ( @responsible Minister ID, @language ID, @responsible Minister) END The Insert Stored Procedure works well, however, I now need to UPDATE my Drop Down List box with the data that lies within the responsible Minister table.

updating listbox from code behind-46

Can someone please help me resolve this issue of "How I may REFRESH the list found within the drop down list box with the new values found within the database table"???

Any ideas would be greatly appreciated, Thanks, ~Brad ------------------------------ Brad Isaacs ASP.

NET 2.0 / SQL Server 2000 db / Visual Basic Code behind On my page I have added an SQL Datasource that contains the SQL query to retrieve the list for my Drop Down List Box.

public class State: INotify Property Changed { private string _name; private string _capital; public State() { } public State(string name, string capital) { this. Capital=capital; } public string Name { get { return _name; } set { _name=value; On Property Changed(this,"Name"); On Property Changed(this, "Name"); } } public string Capital { get { return _capital; } set { _capital = value; On Property Changed(this, "Capital"); On Property Changed(this, "Name"); } } public override string To String() { return (Name + " " + Capital ); } public event Property Changed Event Handler Property Changed; public void On Property Changed(object sender,string Property) { if (Property Changed !

= null) { Property Changed(sender, new Property Changed Event Args(Property)); } } } The Observable Collection maintains my list of states.

Last modified 03-Feb-2016 08:14