473,406 Members | 2,293 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Problem while retrieving multiple item in checkboxlist

I cant retrieve selected item from checkboxlist in asp.net project.
when i submit multiple item from checkboxlist it works fine. but when i am trying to edit this items then checkboxlist does not select the previous values that i have selected.It only selects one item. my code which i am using for edit is following:
Dim _drArticle As SqlDataReader
_drArticle = SqlHelper.ExecuteReader(ConfigurationSettings.AppS ettings("ConnectionString"), _
CommandType.Text, _
"SELECT *FROM MST_ACCESS WHERE MA_MUT_ID=" & CInt(Request.QueryString("ArtID")))



If _drArticle.HasRows Then

_drArticle.Read()
On Error Resume Next
'checkboxlist1.SelectedValue = _drArticle("MA_MUR_ID")

Dim i As Integer
For i = 0 To checkboxlist1.Items.Count - 1
If checkboxlist1.Items(i).Selected = True Then
checkboxlist1.Items(i).Value = _drArticle("MA_MUR_ID")
checkboxlist1.SelectedValue = checkboxlist1.Items(i).Value

End If
Next
end if
Jan 17 '07 #1
0 1172

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: bill yeager | last post by:
Duray, it helps in regards to knowing how to get the items that were selected in the lisbox, but I'm going in reverse --- after I get the items from the db that were selected, I'd like to be able...
4
by: Bass Pro | last post by:
Hi, I am creating textbox, radiobuttonlist and checkboxlist dynamically depending on data from a table. It is a questionnaire. I add the control on a Panel control during the 1st load_page event....
5
by: Patrick.O.Ige | last post by:
I'm binding a CheckBoxlist below in the ItemDataBound(the CheckBoxList is in a Datalist) By doing "li.Selected = True" i can see all the checkBoxes are selected. But what i want is to be able...
1
by: Patrick.O.Ige | last post by:
I have CheckboxList Databinded below and that works fine and i can get the selected values after PostBack. But what i have noticed is that when you select a checkbox i.e lets say 3 of them and...
1
by: Lynn | last post by:
Hello, I have a page that allows the person to select multiple items from a checkboxlist. The checkboxlist is being populated from a table in the database. The user's selections are sent to the...
1
by: Mike | last post by:
I have a Datalist control on my page that I have binded to a table of available categories. In the Item Template I have a CheckboxList control bound to the products available in each Category. I...
1
by: Jeppe Jespersen | last post by:
Checkout a little 3-minuter video i made, illustrating my problem. http://www.netkoder.dk/cl/ Any ideas? Jeppe
0
by: riteshraha | last post by:
i cant retrieve selected item from checkboxlist in asp.net project. when i submit multiple item from checkboxlist it works fine. but when i am trying to edit this items then checkboxlist does not...
1
by: sheenaa | last post by:
Hello friends, I m using ASP.NET with C# 2005 and SQL SERVER 2005 for the ASP.Net Website. I m using sqldatasource to connect and retrieve the data from database and then it displays the data...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.