Databound SelectionList Problem

R

Ran

Hi,

Can somebody help me out??
This is my problem...I have a Databound Selectionlist on my mobile form.

this is how i fill it

SqlConnection1.Open()
SqlDataAdapter1.Fill(DataSet11, "Authors")
AuthorList.DataBind()
List1.DataBind()

The problem is that i do not get the list of selected values on the other
form.I always get "Select a value" which shd be displayed only when there
are no items selected.The code works if i add items without databinding.ie.,
when i manually do
<mobile:SelectionList id=AuthorList runat="server" SelectType="CheckBox">
<item text = .../>
</mobile:SelectionList >
I am pretty new to ASP.NET and i have no idea what to do....

This is the code i use to display the selected items on another form.

For Each myitem In AuthorList.Items
If (myitem.Selected) Then

If (Text.Length > 0) Then

Text = Text & Separator

End If

Text = Text & myitem.Text & " : " & myitem.Value

End If

Next

If (Text.Length = 0) Then

Text = "Select a Value"

End If

Label1.Text = Text

ActiveForm = Form2

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top