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

  • Thread starter Ashish Kanoongo
  • Start date
A

Ashish Kanoongo

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
 
V

Vjekoslav Babic

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



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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top