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 7651585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T11:32:36+00:00 2026-05-31T11:32:36+00:00

I had to change some code that was created by another person in VS2008,

  • 0

I had to change some code that was created by another person in VS2008, I converted it to the VS2010 version and was working just fine until the moment I needed to change a master page file. The moment I opened it, it gave me a lot of “does not exist in the current context” errors from the code behind showing that the code behind file could not find some of the controls declared in the master page file.

So, the code that gets errors is like this:

<li class='<asp:Literal ID="litLIClass_Test1" runat="server"/>'>stuff</li>

As you can see, the <li> CSS class is being generated inside that ASP literal, but it seems that the ASP literal doesn’t get initialized.

However, it seemed to be working before, and I am trying to understand why it started giving me errors when I opened the page code for the first time in VS2010. Is there a particular setting that enables this kind of nesting? Could there be different settings in VS2008/2010?

  • 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-31T11:32:38+00:00Added an answer on May 31, 2026 at 11:32 am

    In my experience, this is usually a Namespace not matching issue.

    A few things to try:

    1. I list this as #1 because it’s the quickest, Make sure your local
      web server is also turned off, Restart Visual Studio, Recompile (it
      works sometimes in my experience). Make sure that the namespace in
      your code behind file matches the namespace in your page (if it’s
      WebForms). I assume this also includes the master page but I don’t
      know, I do know that you can get this error when the ASPX and the
      code behind namespaces are off.
    2. If it’s a code behind scenario, make sure the form is inherited properly.
    3. Make sure you’re not missing a reference you need. This is a common
      cause of the error, especially when upgrading. Your code files
      maybe identical but your web.config or what is referenced by default
      might have changed.
    4. I’ve read that this can be caused by two forms pointing to the same
      code file, but I’ve never actually experienced that (nor do I do
      that).

    References:

    • http://msdn.microsoft.com/en-us/library/t8zbaa6f.aspx
    • http://geekswithblogs.net/mikehuguet/archive/2011/01/03/143332.aspx

    (I had more reference links to post but I can’t because I don’t have the reputation yet). 😉

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Had a page that was working fine. Only change I made was to add
Lately I had to change some code on older systems where not all of
What are some strategies that people have had success with for maintaining a change
Looking at some old VB 6.0 code we had created a global mFont variable
I recently inherited some code that someone else had written. I discovered that everywhere
I am working with some matlab code that processes data (in a Kalman Filter)
I'm looking for some feedback from anyone that has had a chance to spend
I'm really asking this by proxy, another team at work has had a change
I had made changes in a folder called branch, and now that its working
What I think I need to do is create some code that lets me

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.