Compilation Error: dropdownlist does not contain a definition for selected value

Discussion in 'ASP .Net' started by Ashish Kanoongo, Feb 3, 2004.

  1. I am getting error at the time of compilation, However application runs successfully

    'System.Web.UI.WebControls.DropDownList' does not contain a definition for 'SelectedValue'.

    It is giving error in following line.

    ddl.SelectedValue=ddlSelectedValue

    If I change this to

    ddl.SelectedItem.Value=ddlSelectedValue or
    ddl.SelectedItem.Value.ToString=ddlSelectedValue

    Both are run succewssfully and not giving any compilation error.

    I am newbie in DOTNET, so please guide me whats wrong I am doing. I am using Framework v1.0.3705.



    Ashish


    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (http://www.grisoft.com).
    Version: 6.0.576 / Virus Database: 365 - Release Date: 01/30/2004
     
    Ashish Kanoongo, Feb 3, 2004
    #1
    1. Advertising

  2. Ashish,

    you should upgrade to .NET Framework 1.1, because SelectedValue property is
    not available in the version you use.

    Regards,

    --
    Vjekoslav Babic, MCSA, MCDBA



    "Ashish Kanoongo" <> wrote in message
    news:...
    I am getting error at the time of compilation, However application runs
    successfully

    'System.Web.UI.WebControls.DropDownList' does not contain a definition for
    'SelectedValue'.

    It is giving error in following line.

    ddl.SelectedValue=ddlSelectedValue

    If I change this to

    ddl.SelectedItem.Value=ddlSelectedValue or
    ddl.SelectedItem.Value.ToString=ddlSelectedValue

    Both are run succewssfully and not giving any compilation error.

    I am newbie in DOTNET, so please guide me whats wrong I am doing. I am using
    Framework v1.0.3705.



    Ashish


    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (http://www.grisoft.com).
    Version: 6.0.576 / Virus Database: 365 - Release Date: 01/30/2004
     
    Vjekoslav Babic, Feb 3, 2004
    #2
    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. Justin Dutoit
    Replies:
    3
    Views:
    3,515
    =?Utf-8?B?dG9tIHdpc25vd3NraQ==?=
    Oct 7, 2004
  2. Luis Esteban Valencia
    Replies:
    1
    Views:
    4,295
    =?Utf-8?B?Vmtv?=
    Jan 6, 2005
  3. Earl Teigrob
    Replies:
    1
    Views:
    408
    Shravan
    Mar 1, 2004
  4. Joel Zinn

    ItemDataBound error: does not contain a definition for

    Joel Zinn, Sep 14, 2006, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    913
    Joel Zinn
    Sep 14, 2006
  5. Jason Carlton
    Replies:
    11
    Views:
    250
    Dr J R Stockton
    Dec 8, 2009
Loading...

Share This Page