Alex Rivera | Logout

ASP.net controls not found in the code behind when implementing resources

Asked 2012-07-04T15:10:37.407
12

Since we implemented globalization in our ASP.net website, we are getting some intellisense problems.

When the resource is added to an asp.net control, we receive errors. Even though the error is shown in visual studio, the application works!

For example, the following button

 <asp:Button runat="server" ID="BtnSave" Text="<%$ Resources:ResourceName, Save %>" OnClick="BtnSave_Click" />

Is not recognized in the code behind:

intellisense problem

The error is only shown when the code behind is open. But in the browser it works!

The same button without the resource reference works well:

 <asp:Button runat="server" ID="BtnSave" Text="Save" OnClick="BtnSave_Click" />

This is a custom SQL resource provider factory, added to the web.config:

 <globalization resourceProviderFactoryType="MyNamespace.SqlResourceProviderFactory" />

I tried deleting the cache and restarting the computer already.

Do you have any tips on how to find the issue?

Thanks in advance.

Edit
Report

1 Answer

0

Can you please do "clean solution" and delete temp folder of asp.net in c drive and let me know if this helps

answered 2012-07-18T16:45:03.097

Your Answer