DropDown1.SelectedItem.Value.......

From: Lasse Edsvik (lasse_at_nospam.com)
Date: 10/04/04


Date: Mon, 4 Oct 2004 10:55:13 +0200

Hello

I have a dropdown with 3 different values, and it prints out first value no
matter how i change it......

private void Button1_Click(object sender, System.EventArgs e)

{

if(Page.IsValid)

{

Response.Write(DropDown1.SelectedItem.Value);

}

}

what's wrong?

/Lasse



Relevant Pages

  • Re: Binding a Datareader to Dropdown
    ... the biggest mistake people make when binding data to a dropdown is ... private void DropDownList1_SelectedIndexChanged(object sender, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Autopostback Confusion.
    ... private void Page_Load ... // Put user code to initialize the page here ... private void DropDownList1_SelectedIndexChanged(object sender, ... Autopostback on the dropdown and textbox are ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: question about comboBox
    ... private void comboBox2_SelectedIndexChanged(object sender, ... No matter what I selected from the comboBox, ...
    (microsoft.public.dotnet.languages.csharp)
  • DropDownList inside a DataList
    ... private void DisplayTicketData_ItemDataBound(object sender, ... DataListItemEventArgs e){ ... all it gives me is a blank dropdown list. ...
    (microsoft.public.dotnet.framework.aspnet)
  • dropdown SelectedIndexChanged not working on IE
    ... I have this dropdown that doesn't seem to work when i change its state ... ..aspx page (the dropdown options get filled from a database): ... private void dropArchive_SelectedIndexChanged(object sender, ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)