Search code examples
asp.netimportlocalizationascx

Import Namespace in ascx don't work


<%@ Import namespace="Project.Web.Localization" %>
<%:Shared.LogOnUserControl.Account%>

I try this to make shorter my code :), but it didn't work :(

ASP didn't find folder Shared.

but this is working <%:Project.Web.Localization.Shared.LogOnUserControl.Account%>


Solution

  • As i understand, i can import only namespace to ended file in the path: <%@ Import namespace="Project.Web.Localization.Shared" %> and now i can use like this <%:LogOnUserControl.Account%> So now i am try to refactor my code to much general