Re: Persisting DDL.SelectedValue or DDL.SelectedItem.Value without Viewstate

Discussion in 'ASP .Net' started by Marina, Aug 12, 2003.

  1. Marina

    Marina Guest

    Use the forms collection. Something like Request.Form("myDDL") in VB.

    "Paul Aspinall" <> wrote in message
    news:...
    > Hi
    > I have a DDL (DropDownList), which has a number of records in it.
    >
    > In order to post the selected item back to the DB, I need to know what was
    > selected when the page postsback.
    >
    > I can get the value, if ViewState is enabled on the DDL, by using
    > DDL.SelectedValue or DDL.SelectedItem.Value
    >
    >
    > However, doing this also persists the entire contents of the DDL, and not
    > just the selected item.
    >
    > How can I get the value of DDL.SelectedValue, but without using ViewState

    to
    > persist the Entire contents. The reason, is because I don't want to pass

    all
    > the records back in ViewState. I'm happy for the server to regenerate the
    > records, but I need to know which item was selected, ie. DDL.SelectedValue
    >
    >
    > Any help appreciated.
    >
    >
    > Thanks
    >
    >
     
    Marina, Aug 12, 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. =?Utf-8?B?TkNaSU1N?=

    SelectedValue - SelectedItem

    =?Utf-8?B?TkNaSU1N?=, Dec 4, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    3,962
    Karl Seguin
    Dec 4, 2004
  2. darrel
    Replies:
    5
    Views:
    16,346
    Rustykool
    Jan 24, 2013
  3. =?Utf-8?B?Q2FybG8gTWFyY2hlc29uaQ==?=

    why is ddl.selectedValue not retained in viewstate ?

    =?Utf-8?B?Q2FybG8gTWFyY2hlc29uaQ==?=, Oct 3, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    508
    JIMCO Software
    Oct 4, 2005
  4. Elmo Watson
    Replies:
    0
    Views:
    434
    Elmo Watson
    Jul 7, 2006
  5. J
    Replies:
    2
    Views:
    373
Loading...

Share This Page