?
Solved

How to add an item to dropdown list? need to correct?

Posted on 2016-08-25
3
Medium Priority
?
57 Views
Last Modified: 2016-09-06
while dr(.Read())

  {
Unitlocation qlocation = new Unitlocation();
qlocation.slocation = rdr["UNIT"].ToString();
listlocations.Add(qlocation);

when I debug this..qlocation has value of "Emply.PersonDb"...
qlocation.slocation has the string value I need to display

It does not take code listlocations.Add(qlocation.slocation)..

In debug mode there is a wrench icon for slocation value..
I used VS 2015
0
Comment
Question by:zachvaldez
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 13

Accepted Solution

by:
Jeff Darling earned 2000 total points
ID: 41770960
What about this?

listlocations.Add(rdr["UNIT"].ToString());

Open in new window

0
 

Author Comment

by:zachvaldez
ID: 41785600
thanks
0
 

Author Closing Comment

by:zachvaldez
ID: 41786412
yeah! I thought I closed this already. I didn't realize EE modify the process to close question. Pretty clever though!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question