Databound SelectionList Problem

Discussion in 'ASP .Net Mobile' started by Ran, Aug 11, 2003.

  1. Ran

    Ran Guest

    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
    Ran, Aug 11, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. rodchar
    Replies:
    0
    Views:
    379
    rodchar
    Nov 26, 2007
  2. Sanjay Sood

    SelectionList Problem

    Sanjay Sood, Jul 17, 2003, in forum: ASP .Net Mobile
    Replies:
    1
    Views:
    134
  3. Brad Wist

    SelectionList DataValueField problem

    Brad Wist, Jul 30, 2003, in forum: ASP .Net Mobile
    Replies:
    0
    Views:
    147
    Brad Wist
    Jul 30, 2003
  4. leezard

    SelectionList problem

    leezard, Aug 17, 2003, in forum: ASP .Net Mobile
    Replies:
    1
    Views:
    137
    duncan mason
    Aug 21, 2003
  5. Manu
    Replies:
    0
    Views:
    159
Loading...

Share This Page