469,292 Members | 1,350 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,292 developers. It's quick & easy.

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 1053

Post your reply

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

Similar topics

reply views Thread by bill yeager | last post: by
4 posts views Thread by Bass Pro | last post: by
1 post views Thread by Patrick.O.Ige | last post: by
1 post views Thread by Lynn | last post: by
1 post views Thread by Jeppe Jespersen | last post: by
reply views Thread by riteshraha | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.