Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET Controls are not coming in Code-behind IntelliSense

I am having an aspx page where I have added one asp.net text box control with ID and RUNAT attribute. But in Code-behind I am not seeing this control's name in the intellisense.

My page directive in aspx is as follows

 <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="MyProject_UI._Default" %>

I am using VS 2008. Any idea how to get rid of this?

like image 219
Shyju Avatar asked Nov 22 '25 08:11

Shyju


2 Answers

Try using CodeFile instead of CodeBehind. The latter is a hold-over from .NET 1.1.

Also, make sure the namespaces match up between the markup and the code. Do a test compile to be sure.

like image 161
RickNZ Avatar answered Nov 24 '25 18:11

RickNZ


I have seen this on occasion when I edit a page. When it happens to me, I close the files and open them again and it seems to fix itself.

like image 23
Gabriel McAdams Avatar answered Nov 24 '25 19:11

Gabriel McAdams



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!