views:

614

answers:

3

Hi, I have controls in ascx file but i can't see them in intellisense in .cs file.It was working nice before.

I can see the control names in designer.cs file.

I have deleted the Asp.net temp files in AppData folder but still not working.The other user control files in the app can reference coerrectly to it's page controls. What is the problem here ? I use VS2008.

+1  A: 

Look at the top line of the .ascx page and check out the value of Inherits= and make sure that is has the right namespace.class appropriate for your codebehind. For example if your namespace is ProjectNamespace and your control class is MyControl then it should be ProjectNamespace.MyControl. This can get out of synch if you renamed the ascx file, etc and cause this type of problem.

Nick
I have checked it and it is correct but still not working.
e-turhan
A: 

I just figured this out for my situation: in the Page parameters of the .aspx file, the 'Codefile' parameter was pointing to the file name: 'LabEdit.aspx.cs'. It should have been pointing to the path: "~/WOPages/LabEdit.aspx.cs". I know I didn't move the codefile or the page file, so this is maybe a problem with VS2008

dsteele
A: 

I have solved the problem, I have uninstalled and reinstalled VS2008 and it is solved.

e-turhan
seems a bit a extreme.
Sekhat