473,320 Members | 2,027 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

VS 2003 Binding Drop Box

Can anyone point me to an example on the net of how to bind a drop box
on a Web form using VS2003.net? for some reason, I can't get my drop box
or list box to bind to my dataset. I am using VB.Net.

Help appreciated.
Frank

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #1
2 1366
ddl.DataSource = ds.Tables[0]
ddl.DataTextField = "ColumnText"
ddl.DataValueField = "ColumnValue" // usually id
ddl.DataBind()

where ddl is DropDownList or ListBox and ds is your DataSet.

Hope this helps!
Regards,
Kostadin Kostov

"Frank Bishop" wrote:
Can anyone point me to an example on the net of how to bind a drop box
on a Web form using VS2003.net? for some reason, I can't get my drop box
or list box to bind to my dataset. I am using VB.Net.

Help appreciated.
Frank

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 19 '05 #2
Hi Frank
Try this:
mylist.dataSource=ds
mylist.dataMember="MyTable"
mylist.dataTextFiled="MyDataCoulum" '''''''''''''' this is the most
important
mylist.dataBind()

"Frank Bishop" wrote:
Can anyone point me to an example on the net of how to bind a drop box
on a Web form using VS2003.net? for some reason, I can't get my drop box
or list box to bind to my dataset. I am using VB.Net.

Help appreciated.
Frank

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: tp | last post by:
HI..... I have made simpale web site inside that i am generating email page which send form as email. i have setup small business server with Exchange server 2003 and i have hosted my website...
0
by: Jason | last post by:
What interface do I need to implement in order to get a component with a public property to show up in the data binding drop down boxes at design time in VS.net? I've tried to look just about...
5
by: Vigneshwar Pilli via DotNetMonster.com | last post by:
string connectionString1 = "server=(local); user=sa;password=sa; database=sonic"; System.Data.SqlClient.SqlConnection dbConnection1 = new System.Data.SqlClient.SqlConnection(connectionString1);...
0
by: JSantora | last post by:
Essentially, InsertAT is broken! For the past couple of hours, I've been getting this "Parameter name: '-2147483550' is not a valid value for 'index'." error. Apparently, its caused by having...
0
by: maflatoun | last post by:
Hi everyone, I have the following very odd problem (only happens on Windows 2003 Server and not XP) In my class I have (no namespace) class test { ... public static void method...
2
by: Antonio | last post by:
Can somebody tell me what's wrong with this? I am trying to bind a drop-down box to a table (states). Thanks, //binding for the State drop-down SqlConnection cStates = new SqlConnection...
2
by: bmayer | last post by:
I am using a detail view and binding it to a sql data source (at some point in the future it will be an object data source). I have seen the article "Working with Data is ASP.NET 2.0 ::...
0
by: Fred | last post by:
I am trying to build a consumer to a webservice which use soapheader. I am using Visual Studio 2003. Please see the wsdl-file below. Why is it that the SOAPHEADER is empty when I use it int the...
9
by: =?Utf-8?B?VGVycnk=?= | last post by:
Think it is great the way that you can set up a datsource, value member, and display member for a combobox, and map a 'code' to a 'description' and back again by binding the combobox to a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.