B
Brad Isaacs
ASP.NET 2.0 / SQL Server 2000 db / Visual Basic Code behind
On my .aspx page I have added an SQL Datasource that contains the SQL query
to retrieve the list for my Drop Down List Box.
Using this SQLDataSource I can retrieve my drop down list data.
SELECT DISTINCT responsibleMinister
FROM responsibleMinister
WHERE languageID = @languageID
ORDER BY responsibleMinister 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 responsibleMinisterID
DECLARE @responsibleMinisterID smallint
SELECT @responsibleMinisterID=MAX(responsibleMinisterID)+1
FROM dbo.[responsibleMinister]
WHERE languageID=@languageID
INSERT INTO dbo.[responsibleMinister](
[responsibleMinisterID],
[languageID],
[responsibleMinister])
VALUES (
@responsibleMinisterID,
@languageID,
@responsibleMinister)
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.
I tried to enable Post Back but that did not refresh the drop down list.
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
On my .aspx page I have added an SQL Datasource that contains the SQL query
to retrieve the list for my Drop Down List Box.
Using this SQLDataSource I can retrieve my drop down list data.
SELECT DISTINCT responsibleMinister
FROM responsibleMinister
WHERE languageID = @languageID
ORDER BY responsibleMinister 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 responsibleMinisterID
DECLARE @responsibleMinisterID smallint
SELECT @responsibleMinisterID=MAX(responsibleMinisterID)+1
FROM dbo.[responsibleMinister]
WHERE languageID=@languageID
INSERT INTO dbo.[responsibleMinister](
[responsibleMinisterID],
[languageID],
[responsibleMinister])
VALUES (
@responsibleMinisterID,
@languageID,
@responsibleMinister)
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.
I tried to enable Post Back but that did not refresh the drop down list.
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