DropDownList control, select item problem

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

    #1

    DropDownList control, select item problem

    Hi
    I am using predefined membership and roles managemant approach
    characteristic for framework 2.0

    Basic idea is that we select some value from DropDownList which
    represents a role and we get all users for selected role.
    This works and that is not a problem.

    Problem is in DropDownList control...

    I am using select value as follow:
    string roles = DropDownList_Ro les.SelectedVal ue;

    Recieived items
    ---------------------------------------------------------------------------
    DropDownList_Ro les.DataSource = Roles.GetAllRol es();
    DropDownList_Ro les.DataBind();

    For e.g. if I get following vales:
    ABC
    AAA
    CCC
    RRR
    FFF

    What is wrong?
    -----------------------------
    Whatever I select, I always getting first value, in this case value
    ABC.

    Thanks for help.

    Mike
  • =?ISO-8859-1?Q?G=F6ran_Andersson?=

    #2
    Re: DropDownList control, select item problem

    Mike wrote:
    Hi
    I am using predefined membership and roles managemant approach
    characteristic for framework 2.0
    >
    Basic idea is that we select some value from DropDownList which
    represents a role and we get all users for selected role.
    This works and that is not a problem.
    >
    Problem is in DropDownList control...
    >
    I am using select value as follow:
    string roles = DropDownList_Ro les.SelectedVal ue;
    >
    Recieived items
    ---------------------------------------------------------------------------
    DropDownList_Ro les.DataSource = Roles.GetAllRol es();
    DropDownList_Ro les.DataBind();
    >
    For e.g. if I get following vales:
    ABC
    AAA
    CCC
    RRR
    FFF
    >
    What is wrong?
    -----------------------------
    Whatever I select, I always getting first value, in this case value
    ABC.
    >
    Thanks for help.
    >
    Mike
    This is an ASP.NET question. You should ask this in the aspnet newsgroup
    instead.

    --
    Göran Andersson
    _____
    Göran Anderssons privata hemsida.

    Comment

    Working...