Compdigitec Labs

« | Home | »

Solving “The name … does not exist in the current context” in ASP.NET

By admin | July 7, 2010

A little-known fact is that in ASP.NET is that you cannot have two copies of the same ASP.NET web page in the same folder, or it will attempt to load elements (such as controls) from the (usually) wrong page, and end up confusing itself, resulting in the error “The name … does not exist in the current context”. This can be very confusing as you try to figure out why it is not working even though it looks like you are doing it correctly.

To resolve this, make sure there are no copies of the page in the same folder (such as things like backup files, accidental copies, etc) in the same folder. Either move them to a different folder or rename their extensions: .aspx to .aspxold and .cs to .csold.

If you found this article helpful or interesting, please help Compdigitec spread the word. Don’t forget to subscribe to Compdigitec Labs for more useful and interesting articles!

Topics: HTTP (Internet), Windows | 5 Comments »

5 Responses to “Solving “The name … does not exist in the current context” in ASP.NET”

  1. Jaunita Says:
    November 15th, 2012 at 00:14

    I will immediately grab your rss as I can’t find your e-mail subscription link or e-newsletter service. Do you’ve any?

    Please let me know in order that I could subscribe.
    Thanks.

  2. vender conta clash royale Says:
    October 15th, 2021 at 21:09

    … [Trackback]

    […] Find More on that Topic: compdigitec.com/labs/2010/07/07/solving-the-name-does-not-exist-in-the-current-context-in-asp-net/ […]

  3. shrooms reddit Says:
    October 20th, 2021 at 04:15

    … [Trackback]

    […] There you can find 20028 additional Info on that Topic: compdigitec.com/labs/2010/07/07/solving-the-name-does-not-exist-in-the-current-context-in-asp-net/ […]

  4. Digital Strategies for Transformation Says:
    December 15th, 2021 at 05:02

    … [Trackback]

    […] Information to that Topic: compdigitec.com/labs/2010/07/07/solving-the-name-does-not-exist-in-the-current-context-in-asp-net/ […]

  5. find more info Says:
    January 6th, 2022 at 05:17

    … [Trackback]

    […] Read More here on that Topic: compdigitec.com/labs/2010/07/07/solving-the-name-does-not-exist-in-the-current-context-in-asp-net/ […]

Comments