Professional Web Applications Themes

DropDownList.SelectedValue not changing - ASP.NET General

I have a DropDownList that is bound and properly filled from my DataSet when the page loads. but when the I try to retrieve any value I always get the first value...Any ideas?...

  1. #1

    Default DropDownList.SelectedValue not changing

    I have a DropDownList that is bound and properly filled from my DataSet
    when the page loads. but when the I try to retrieve any value I always
    get the first value...Any ideas?

    Jesse Guest

  2. #2

    Default Re: DropDownList.SelectedValue not changing

    Do you bind the DroPDownList only on initial request that is checking
    !IsPostBack (Not isPostBack)?

    --
    Teemu Keiski
    MCP, Designer/Developer
    Mansoft tietotekniikka Oy
    [url]http://www.mansoft.fi[/url]

    AspInsiders Member, [url]www.aspinsiders.com[/url]
    ASP.NET Forums Moderator, [url]www.asp.net[/url]
    AspAlliance Columnist, [url]www.aspalliance.com[/url]


    "Jesse" <spootwohotmail.com> wrote in message
    news:u91a3LgUDHA.2052TK2MSFTNGP10.phx.gbl...
    > I have a DropDownList that is bound and properly filled from my DataSet
    > when the page loads. but when the I try to retrieve any value I always
    > get the first value...Any ideas?
    >

    Teemu Keiski Guest

  3. #3

    Default Re: DropDownList.SelectedValue not changing

    Thank you...I had no idea

    Teemu Keiski wrote:
    > Do you bind the DroPDownList only on initial request that is checking
    > !IsPostBack (Not isPostBack)?
    >
    Jesse Guest

  4. #4

    Default DropDownList.SelectedValue not changing

    Please Set "Autopost back" PROPERT to "true" and you will
    be cool.

    >-----Original Message-----
    >I have a DropDownList that is bound and properly filled
    from my DataSet
    >when the page loads. but when the I try to retrieve any
    value I always
    >get the first value...Any ideas?
    >
    >.
    >
    DudeGuy Guest

  5. #5

    Cool Re: DropDownList.SelectedValue not changing

    Add AppendDataBoundItems="true" in dropdown Properties



    asp:DropDownList ID="ddlProject" runat="server" AutoPostBack="true" AppendDataBoundItems="true"

    onselectedindexchanged="ddlProject_SelectedIndexCh anged"
    Rose Guest

  6. #6

    Exclamation DropDownList.SelectedValue not changing

    my dropdownlist's selectedvalue is showing 0 always?
    any idea to change it accrding to selection
    Unregistered Guest

  7. #7

    Default Re: DropDownList.SelectedValue not changing

    DropDownList1.SelectedValue = "3";
    Unregistered Guest

Similar Threads

  1. Question Changing value shown in dropdownlist
    By Unregistered in forum Brainstorming Area
    Replies: 0
    Last Post: October 2nd, 11:43 AM
  2. changing the dropdownlist
    By mr dropdown in forum ASP.NET Building Controls
    Replies: 0
    Last Post: July 1st, 12:28 PM
  3. Retrieving SelectedValue from DropDownList
    By AlBruAn in forum ASP.NET Data Grid Control
    Replies: 6
    Last Post: April 12th, 03:07 PM
  4. Losing one row of datagrid when changing dropdownlist inside it.
    By Luis Esteban Valencia in forum ASP.NET Data Grid Control
    Replies: 0
    Last Post: March 23rd, 05:22 PM
  5. Replies: 0
    Last Post: August 12th, 07:08 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139