CS0246: The type or namespace name 'var' could not be found (are you missing a using directive or an assembly reference?)

I get the following error on

var courier = "12345";

"/static/default.aspx"
 
target framework = 3.5 ( in property pages)
I remember i need to add a particular reference?


frosty1Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RDWaibelCommented:
What type of variable do you need?
int courier = 12345
string courier = "12345"
object courier = "12345"
0
frosty1Author Commented:
sorry to clarify i want to use the var keyword that is possible to asp.net 3.5.

My website is set to 3.5 but i don't understand why i can't use the var keyword on my site. I can use if i create a class library and import the dll into my site. I think i just need a reference. But can't remember which one.
0
RDWaibelCommented:
You may need to check the property pages for the web site and go to the "Build" section.
From there, ensure that the target framework is set to 3.5.
0
RDWaibelCommented:
Also, you might want to check the web.config file...

great article about the changes:
http://www.4guysfromrolla.com/articles/121207-1.aspx
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.