Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_beginners thread: DropDownListbox - how to save selected item?


Message #1 by "Miguel Simoes" <mjsimoes@m...> on Wed, 20 Feb 2002 16:36:03
I'm trying to update a column with a selected value from a DropDownListBox 

(Example like the one in VB\datagrid8.aspx)



The problem is that I can´'t save the selected item . I always get the 

predefined value of the FUNCTION GetStateIndex (see code below):



"Public Function GetSituacaoIndex(Situacao As String) As Integer



        If SituacaoIndex(Situacao) <> Nothing

            Return CInt(SituacaoIndex(Situacao))

        Else

            Return 0

        End If

    End Function"



I have a "Public SituacaoIndex As Hashtable" defined and also the code : 

      " StateIndex = New Hashtable()

        StateIndex("A Aguardar despacho") = 0

        StateIndex("A aguardar parecer") = 1

        StateIndex("Arquivado") = 2

        StateIndex("Pendente") = 3

        StateIndex("Não tratado") = 4 "



What I get saved is always the same "A aguardar despacho" because it's the 

0 

value returned by the function .



Sorry for my english...



Can you help me...



TIA



Miguel Simoes

Lisboa



Message #2 by Ronnie Tripplett <rtripplett@a...> on Fri, 22 Feb 2002 09:00:57 -0600
Did this get resolved?  I have a simular situation.....  Any help would 

be

appreciated....



Thanks



-----Original Message-----

From: Miguel Simoes [mailto:mjsimoes@m...]

Sent: Wednesday, February 20, 2002 10:36 AM

To: aspx_beginners

Subject: [aspx_beginners] DropDownListbox - how to save selected item?





I'm trying to update a column with a selected value from a 

DropDownListBox

(Example like the one in VB\datagrid8.aspx)



The problem is that I can=B4't save the selected item . I always get 

the

predefined value of the FUNCTION GetStateIndex (see code below):



"Public Function GetSituacaoIndex(Situacao As String) As Integer



        If SituacaoIndex(Situacao) <> Nothing

            Return CInt(SituacaoIndex(Situacao))

        Else

            Return 0

        End If

    End Function"



I have a "Public SituacaoIndex As Hashtable" defined and also the code 

:

      " StateIndex =3D New Hashtable()

        StateIndex("A Aguardar despacho") =3D 0

        StateIndex("A aguardar parecer") =3D 1

        StateIndex("Arquivado") =3D 2

        StateIndex("Pendente") =3D 3

        StateIndex("N=E3o tratado") =3D 4 "



What I get saved is always the same "A aguardar despacho" because it's 

the

0

value returned by the function .



Sorry for my english...



Can you help me...



TIA



Miguel Simoes

Lisboa








$subst('Email.Unsub').


  Return to Index