Click here to Skip to main content
15,915,851 members
Home / Discussions / C#
   

C#

 
GeneralRe: Casting to Abstract 'parent' rather than casting to Interface ? Pin
BillWoodruff29-Oct-11 16:26
professionalBillWoodruff29-Oct-11 16:26 
AnswerRe: Casting to Abstract 'parent' rather than casting to Interface ? Pin
Luc Pattyn29-Oct-11 17:40
sitebuilderLuc Pattyn29-Oct-11 17:40 
AnswerRe: Casting to Abstract 'parent' rather than casting to Interface ? Pin
PIEBALDconsult29-Oct-11 4:27
mvePIEBALDconsult29-Oct-11 4:27 
GeneralRe: Casting to Abstract 'parent' rather than casting to Interface ? Pin
BillWoodruff29-Oct-11 16:30
professionalBillWoodruff29-Oct-11 16:30 
GeneralRe: Casting to Abstract 'parent' rather than casting to Interface ? Pin
PIEBALDconsult29-Oct-11 17:28
mvePIEBALDconsult29-Oct-11 17:28 
AnswerRe: Casting to Abstract 'parent' rather than casting to Interface ? Pin
Abhinav S29-Oct-11 17:46
Abhinav S29-Oct-11 17:46 
AnswerRe: Casting to Abstract 'parent' rather than casting to Interface ? Pin
BobJanova30-Oct-11 23:36
BobJanova30-Oct-11 23:36 
QuestionC# linq working with list controls Pin
classy_dog28-Oct-11 14:33
classy_dog28-Oct-11 14:33 
In a C#.net 2010 application, I would like to take
values entered into individual checkbox and place each value of the
checkboxes into separate rows in a sql server 2008 r2 table. I would
also like to use linq to sql for this to occur. Since I am new to
working with linq, I am wondering how I could incorporate linq
into one of the options listed below. Would I need to unload all the
values from the checkboxes into a arraylist. Can you tell me
how to complete this task or point me to utls I can use as a
reference?

Here are some of my code examples:


option 1:

[^]foreach (ListItem item in
((CheckBoxList)Form.FindControl("cblActivities")).Items)
{
if (item.Selected)
{
string Activities += item.Value;

}
} [^]

option 2
[^]
IEnumerable<int> allChecked = chkBoxList.Items.Cast<ListItem>()
.Where(i => i.Selected)
.Select(i => int.Parse(i.Value)); [^]
AnswerRe: C# linq working with list controls Pin
BillWoodruff28-Oct-11 14:59
professionalBillWoodruff28-Oct-11 14:59 
GeneralRe: C# linq working with list controls Pin
classy_dog28-Oct-11 17:02
classy_dog28-Oct-11 17:02 
GeneralRe: C# linq working with list controls Pin
BillWoodruff28-Oct-11 18:57
professionalBillWoodruff28-Oct-11 18:57 
QuestionWhat does this code segment mean?? Pin
Goalie3528-Oct-11 11:01
Goalie3528-Oct-11 11:01 
AnswerRe: What does this code segment mean?? PinPopular
harold aptroot28-Oct-11 11:17
harold aptroot28-Oct-11 11:17 
QuestionBitconverter.GetBytes() issue Pin
Blubbo28-Oct-11 8:16
Blubbo28-Oct-11 8:16 
AnswerRe: Bitconverter.GetBytes() issue Pin
Mark Salsbery28-Oct-11 8:36
Mark Salsbery28-Oct-11 8:36 
AnswerRe: Bitconverter.GetBytes() issue Pin
Dennis E White28-Oct-11 9:40
professionalDennis E White28-Oct-11 9:40 
AnswerRe: Bitconverter.GetBytes() issue Pin
harold aptroot28-Oct-11 9:42
harold aptroot28-Oct-11 9:42 
QuestionWriting plugin for IE Pin
johnsson7727-Oct-11 19:44
johnsson7727-Oct-11 19:44 
AnswerRe: Writing plugin for IE Pin
Richard MacCutchan27-Oct-11 23:23
mveRichard MacCutchan27-Oct-11 23:23 
QuestionWhere Did Microsoft.CSharp Go? Pin
Roger Wright27-Oct-11 18:49
professionalRoger Wright27-Oct-11 18:49 
AnswerRe: Where Did Microsoft.CSharp Go? Pin
Abhinav S27-Oct-11 19:35
Abhinav S27-Oct-11 19:35 
GeneralRe: Where Did Microsoft.CSharp Go? Pin
Roger Wright27-Oct-11 20:07
professionalRoger Wright27-Oct-11 20:07 
GeneralRe: Where Did Microsoft.CSharp Go? Pin
Alisaunder28-Oct-11 1:30
Alisaunder28-Oct-11 1:30 
GeneralRe: Where Did Microsoft.CSharp Go? Pin
BobJanova28-Oct-11 2:24
BobJanova28-Oct-11 2:24 
GeneralRe: Where Did Microsoft.CSharp Go? Pin
Alisaunder28-Oct-11 4:19
Alisaunder28-Oct-11 4:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.