Hello , i am developing a aspx page using web forms where i have introduced a dropdown combo box as
Hello , i am developing a aspx page using web forms where i have introduced a dropdown combo box as types and the ask is it should reflect all the types that already exist in database . What changes do i have to make in aspx.vb in order to populate the list as such from the database column.Can anyone suggest how to do so
47 Replies
can't tell you what changes you need to make without knowing what you have now
by definition of what "changes" means
but suffice it to say it's going to involve you retrieving the list of values from the database and rendering them into your page
Yes exactly
What is the way ?
again
I can't tell you without knowing what you have now
Actually there is one column in database named as license type
I have made a combo box in my aspx page as license type
I want to populate exact list which is showing in databse
great
retrieve it
from the database
How
then put it in the ComboBox
you tell me
how do you retrieve things from the database in this app?
what database are you even using?
what data access library are you using?
Microsoft sql
Select query
No idea about this
what runs your select queries for you?
This column list
a column list does not run queries
Which i want to bind
how do you run queries?
Select column name from table
yes, that
how do you do that?
in your app
In database
I run the query
how?
Like how we run query in database
yes
how do you do that in your app?
Are u aware about vb.net?
the thing that does that in your app is your data access library
what data access library are you using?
yes, I use it daily
Production
VB.NET is a language, not a data access library
I am trying to create taking help from multiple places but still cant figure out how to do so
I mean i need to bind the data from database with my aspx.vb page
indeed
In order to populate type list
do you know how to run queries in VB?
That i dont know
How
then that's what you need to be asking
It is done
Any reference
You would like to share
Doc , videos?
To learn that
System.Data.SqlClient Namespace
The System.Data.SqlClient namespace is the .NET Data Provider for SQL Server.
to start
Okay
Do you have any reference project which have the same ask as mine?
ah, here we go
Overview - ADO.NET
Read an overview of ADO.NET in .NET Framework and read about resources for more detailed explanations and examples.
in particular
Code examples - ADO.NET
These examples show .NET Framework programmers how to retrieve data from a database by using ADO.NET data providers and ADO.NET Entity Framework.
?
I'm no archaeologist so I don't know much about webforms and VB, but do you have
connectioNString
declared anywhere?
I'd assume error messages would be helpfulThis code is in c# How can this be convert into vb
by writing it in VB?
also, what code?
the code in that screenshot is VB
you just have errors
If possible can we connect tomorrow on zoom . I need help in resolving error kind of new with this technology
no
if you have questions, ask them here
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.