Solved

Get value from a generic list

Posted on 2010-09-09
2
305 Views
Last Modified: 2012-05-10
Hi,

I return a generic list, but I cannot seem to get a value from the items in the list.
I have the code below.

Would be grateful for any adivice.

Thanks
Dim oNewUserManager As New M04_UserManager

                    Dim oUserList As New List(Of M04_User)

                    oUserList = oNewUserManager.GetAppIDCompIdCompNameForUser(user.ProviderUserKey.ToString)

                    Dim theApplication As String = oUserList.Item(0)

Open in new window

0
Comment
Question by:Soluga
2 Comments
 
LVL 53

Accepted Solution

by:
Dhaest earned 500 total points
ID: 33635997
Can you try the following:

Dim theApplication As  M04_User= oUserList.Item(0)

theApplication.yourpropertyhere
0
 
LVL 1

Author Comment

by:Soluga
ID: 33636065
Yep that worked.

Thanks a bunch.

Dim oNewUserManager As New M04_UserManager
                    Dim oUserList As New List(Of M04_User)
                    oUserList = oNewUserManager.GetAppIDCompIdCompNameForUser(user.ProviderUserKey.ToString)
                    Dim theApplication As M04_User = oUserList.Item(0)

                    Profile.applicationID = theApplication.ApplicationID.ToString
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Where to begin studying? 5 79
Paging GridView 7 48
Achieve json result 2 64
IIS Authorization for Web Service 2 17
I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

937 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now