Question : Visual Studio 2010 ascx.cs files

I am seeing:

"The name 'xxxxxx' does not exist in the curent context"

Builds correctly but any additional changes made generates the errors on all the web control id names in the ascx.cs file and any new modification does not appear on the browser even after rebuild.

Answer : Visual Studio 2010 ascx.cs files

Does your markup page have the correct details regarding your code-behind? That is to say, if your markup file is called "Example.ascx", and your code-behind page is called "Example.ascx.cs" with a class name of "Example", and you have declared your control with the namespace "MyNamespace", then you should have code which looks like the following:
1:
2:
3:
4:
5:
6:
7:
8:
9:
// Example.ascx (C#)
<%@ Control Language="C#" CodeBehind="Example.ascx.cs" Inherits="MyNamespace.Example" %>

// Example.ascx.cs
namespace MyNamespace
{
    public partial class Example : System.Web.UI.UserControl
    {
...
Random Solutions  
 
programming4us programming4us