472,125 Members | 1,494 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,125 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 1132

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

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.