What is the use of <%@ page aspcompat=true %> attribute?

 Posted by ArticlesMaint on 9/16/2009 | Category: ASP.NET Interview questions | Views: 4906

Answer: -
This attribute works like a compatibility option. As mentioned before ASP worked in STA model and ASP.NET works in MTA model, but what if your ASP.NET application is using a VB COM component. In order that VB COM runs properly in ASP.NET threading model, we have to set attribute. After defining the ASPCOMPAT directive attribute ASP.NET pages runs in STA model thus building the compatibility between ASP.NET and old COM components that does not support MTA model.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response