Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 except issues for List<Object>

Author  Topic 

DesiGal
Starting Member

31 Posts

Posted - 2011-03-23 : 11:38:12
I have two lists:

List<object> totalkeys = GridView.GetCurrentPageRowValues("StudentId", "CourseId");
List<object> selectedkeys = GridView.GetSelectedFieldValues("StudentId", "CourseId");

I have two lists one with the total keys and the other list with selected keys.
I want to have a third list with unselected keys.

So I am trying to use this piece of code without any success.

List<object> unselectedkeys = totalkeys.Except(selectedkeys);

Am I missing anything?
Any other suggestions ?

Thanks

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2011-03-23 : 18:51:33
quote:
Originally posted by DesiGal

I have two lists:

List<object> totalkeys = GridView.GetCurrentPageRowValues("StudentId", "CourseId");
List<object> selectedkeys = GridView.GetSelectedFieldValues("StudentId", "CourseId");

I have two lists one with the total keys and the other list with selected keys.
I want to have a third list with unselected keys.

So I am trying to use this piece of code without any success.

List<object> unselectedkeys = new List<object>(totalkeys.Except(selectedkeys));

Am I missing anything?
Any other suggestions ?

Thanks


Go to Top of Page
   

- Advertisement -