DropDownList

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mira Vizjak

    #1

    DropDownList

    Hi
    I looked everywhere to solve my problem but with no success. On page there
    is a dropdownlist control which is binded to a database. When I select one
    of the list item and press a button I would like to get the SelectedItem
    property, but it is always set to Nothing. What should i do? On page load I
    use Page.IsPostBack =false to load the dropdownlist only once.
    Thanks!

    Jure


  • Sonali.NET[MVP]

    #2
    Re: DropDownList

    Have you set AutoPostBack =true of Ddl

    Regards
    Sushila
    ..NET MVP

    "Mira Vizjak" <mira.vizjak1@g uest.arnes.si> wrote in message news:berr1k$ljg $1@planja.arnes .si...[color=blue]
    > Hi
    > I looked everywhere to solve my problem but with no success. On page there
    > is a dropdownlist control which is binded to a database. When I select one
    > of the list item and press a button I would like to get the SelectedItem
    > property, but it is always set to Nothing. What should i do? On page load I
    > use Page.IsPostBack =false to load the dropdownlist only once.
    > Thanks!
    >
    > Jure
    >
    > [/color]

    Comment

    • Mira Vizjak

      #3
      Re: DropDownList

      I don't want the page to reload so I can't use AutoPostBack=tr ue.

      Comment

      • Mira Vizjak

        #4
        Re: DropDownList

        I don't want the page to reload so I can't use AutoPostBack=tr ue.

        Comment

        • Souri Challa

          #5
          Re: DropDownList

          Did you set the 'EnableViewStat e' to true for the dropdownlist ?

          "Mira Vizjak" <mira.vizjak1@g uest.arnes.si> wrote in message
          news:berr1k$ljg $1@planja.arnes .si...[color=blue]
          > Hi
          > I looked everywhere to solve my problem but with no success. On page there
          > is a dropdownlist control which is binded to a database. When I select one
          > of the list item and press a button I would like to get the SelectedItem
          > property, but it is always set to Nothing. What should i do? On page load[/color]
          I[color=blue]
          > use Page.IsPostBack =false to load the dropdownlist only once.
          > Thanks!
          >
          > Jure
          >
          >[/color]


          Comment

          • Souri Challa

            #6
            Re: DropDownList

            Did you set the 'EnableViewStat e' to true for the dropdownlist ?

            "Mira Vizjak" <mira.vizjak1@g uest.arnes.si> wrote in message
            news:berr1k$ljg $1@planja.arnes .si...[color=blue]
            > Hi
            > I looked everywhere to solve my problem but with no success. On page there
            > is a dropdownlist control which is binded to a database. When I select one
            > of the list item and press a button I would like to get the SelectedItem
            > property, but it is always set to Nothing. What should i do? On page load[/color]
            I[color=blue]
            > use Page.IsPostBack =false to load the dropdownlist only once.
            > Thanks!
            >
            > Jure
            >
            >[/color]


            Comment

            • dj Bass

              #7
              Re: DropDownList

              the item in a check list has a value and item text, are you setting the item
              value?

              "Mira Vizjak" <mira.vizjak1@g uest.arnes.si> wrote in message
              news:berr1k$ljg $1@planja.arnes .si...[color=blue]
              > Hi
              > I looked everywhere to solve my problem but with no success. On page there
              > is a dropdownlist control which is binded to a database. When I select one
              > of the list item and press a button I would like to get the SelectedItem
              > property, but it is always set to Nothing. What should i do? On page load[/color]
              I[color=blue]
              > use Page.IsPostBack =false to load the dropdownlist only once.
              > Thanks!
              >
              > Jure
              >
              >[/color]


              Comment

              • dj Bass

                #8
                Re: DropDownList

                the item in a check list has a value and item text, are you setting the item
                value?

                "Mira Vizjak" <mira.vizjak1@g uest.arnes.si> wrote in message
                news:berr1k$ljg $1@planja.arnes .si...[color=blue]
                > Hi
                > I looked everywhere to solve my problem but with no success. On page there
                > is a dropdownlist control which is binded to a database. When I select one
                > of the list item and press a button I would like to get the SelectedItem
                > property, but it is always set to Nothing. What should i do? On page load[/color]
                I[color=blue]
                > use Page.IsPostBack =false to load the dropdownlist only once.
                > Thanks!
                >
                > Jure
                >
                >[/color]


                Comment

                Working...