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 | 107 Comments »

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

  1. bit.ly/3OEzOZR Says:
    November 27th, 2022 at 19:51

    bit.ly/3OEzOZR

    bit.ly/3OEzOZR

  2. bit.ly/3gGFqGq Says:
    November 27th, 2022 at 20:44

    bit.ly/3gGFqGq

    bit.ly/3gGFqGq

  3. bit.ly/3ARFdXA Says:
    November 28th, 2022 at 05:23

    bit.ly/3ARFdXA

    bit.ly/3ARFdXA

  4. bit.ly/3ig2UT5 Says:
    November 28th, 2022 at 07:04

    bit.ly/3ig2UT5

    bit.ly/3ig2UT5

  5. bit.ly/3GQNK0J Says:
    November 28th, 2022 at 08:30

    bit.ly/3GQNK0J

    bit.ly/3GQNK0J

  6. bep5w0Df Says:
    November 30th, 2022 at 21:37

    bep5w0Df

    bep5w0Df

  7. www Says:
    December 2nd, 2022 at 19:12

    www

    www

Comments