469,643 Members | 1,910 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

asp.net project problem

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. 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 16 '07 #1
0 768

Post your reply

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

Similar topics

15 posts views Thread by cody | last post: by
7 posts views Thread by Kris Desmadryl | last post: by
7 posts views Thread by George Copeland | last post: by
3 posts views Thread by Jerad Rose | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.