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
------------------------------
Brad Isaacs 3 14971
On Mar 28, 12:44 pm, "Brad Isaacs" <bisa...@rogers.comwrote:
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
------------------------------
Brad Isaacs
I'm assuming you're binding the datasource to the dropdownlist control
somehow.
After the insert/update, you'll need to re-bind.
Call the DataBind() function of the drop down list.
bpd & Latish,
Thank you very much for your input
~Brad
:)))
"Latish Sehgal" <la***********@gmail.comwrote in message
news:11*********************@n76g2000hsh.googlegro ups.com...
Call the DataBind() function of the drop down list. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Tom Ewall |
last post by:
I have an iframe which has a drop-down list, which I'm trying to use
to refresh a drop-down list in the main page. I'm using this call to
refresh the page:
...
|
by: Miguel Dias Moura |
last post by:
Hello,
i have an ASP.NET / VB page where i have a few 4 groups of Drop Down Lists.
Each group of Drop Down Lists include 3 Drop Down Lists for date such as:
DAY, MONTH, and YEAR.
I don't want...
|
by: Yoshitha |
last post by:
hi
I have 2 drop down lists in my application.1st list ontains itmes like
java,jsp,swings,vb.net etc.2nd list contains percentage i.e it conatains the
items like 50,60,70,80,90,100.
i will...
|
by: Yi Chen |
last post by:
We have a drop down list on a PHP page, with several product names, and
when people click one item, we will refresh the same page with the
product name as parameter, and in turn we want to include...
|
by: ashok893 |
last post by:
I'm using two drop down list ina form. I have generated the first drop down list from MySQL database. When i select an option from first drop down list, i have to generate second drop down list...
|
by: weiwei |
last post by:
Hi
here is my scenario, I create a drop down list in itemtemplate.(that
drop down is created from db), after user
click edit command, my ideal plan is have another drop down list in...
|
by: penny111 |
last post by:
Hi there,
For my application, i need to have 3 drop down lists
1. drop down list of folder names
2. drop down list of documents in the folder selected
3. drop down list of instances of the...
|
by: crazychrisy54 |
last post by:
Hi there
I have a option, select drop down list which a user can open. My page
however refreshes very frequently and when this occurs the selected
drop down list will pop back up. The user then...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |