Tech
Forums
Jobs
Books
Events
Live
Interviews Prep
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
7
Reply
multiple checked items value insert in single column c#
Devendra Kumar
Jun 17 2016 1:14 AM
197
Reply
how to insert multiple checked value in single column in c#
like i select value like this:
<
asp:DropDownCheckBoxes
ID
="
ddsize
"
runat
="
server
"
UseButtons
="
true
" >
<asp:ListItem
Text
="
Queen
"
Value
="
1
">
</asp:ListItem>
<asp:ListItem
Text
="
Twin
"
Value
="
2
">
</asp:ListItem>
<asp:ListItem
Text
="
Round
"
Value
="
3
">
</asp:ListItem>
<asp:ListItem
Text
="
King
"
Value
="
4
">
</asp:ListItem>
</
asp:DropDownCheckBoxes
>
int str =0;
for (int i = 0; i <= ddsize.Items.Count - 1; i++)
{
if (ddsize.Items[i].Selected)
{
if (str ==0)
{
str =int.Parse( ddsize.Items[i].Value);
}
else
{
str +=int.Parse(ddsize.Items[i].Value);
}
}
}
select value 1 and 2 and 3 then
i want insert all id in single column
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
7
)
Next Recommended Forum
Send mail through ASP.NET web application through backend
How to show aspx in modal pop up in asp.net