Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6018133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:13:52+00:00 2026-05-23T03:13:52+00:00

Scenario: I have VS 2010 (C# 4 compiler) targeting 3.5 on my client machine.

  • 0

Scenario:

I have VS 2010 (C# 4 compiler) targeting 3.5 on my client machine.

I am developing ASP.NET applications. I use optional parameters (C# 4 supported) in a class file and compile the code everything appears to work fine.

Later on an issue that is discovered at Runtime where an old (classic I believe) ASPX is using the function. No function accepts only x arguments where x is one less than the optional parameter is the runtime error.

Does this mean normal classes and such use the C# compiler of the client, while the views (aspx) and such use the compiler on the server – thus causing issues if C# 4 is used in view/form files?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T03:13:53+00:00Added an answer on May 23, 2026 at 3:13 am

    I believe this has to do with the fact that aspx pages are (re?)compiled on first load by IIS rather than being compiled in Visual Studio. This allows them to be updated on the fly without recompiling, however since they’re compiled by IIS it brings the complications you’re seeing.

    I’m not aware of a way to have IIS use the C#4 compiler but compile to .NET 3.5 so it seems like your only options are:

    1. Update to .NET 4
    2. Don’t use optional parameters
    3. Don’t call code that uses optional parameters in your .aspx files. I’m guessing if you move the calls to the codebehind file it should work fine, but I haven’t tried it.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Platform: ASP.NET 4.0, VS 2010 My scenario is this I have the credentials of
Scenario: You have an ASP.Net webpage that should display the next image in a
I have a scenario where I am using a visual studio 2010 database project
I am trying to do a performance test on an asp.net website. I have
Here is my scenario: I have a windows form designed in Visual Studio 2010.
I'm using vs 2010 and have a web application project. I currently use the
I have this scenario: One client sends a message into a msmq queue instance
Ok, i have simple scenario: have two pages: login and welcome pages. im using
Scenario I have two wrappers around Microsoft Office, one for 2003 and one for
Scenario: I have a text file that has pipe (as in the | character)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.