tags:

views:

1129

answers:

3

i place using name space in view code behind but i can't call any class of this name space in aspx.

in code behind: using MVCTest.Controller;

+1  A: 

Did you remember to include the assembly as well? E.g. like this:

// system.web / compilation / assemblies
<add assembly="Microsoft.Web.Mvc"/>
mookid8000
+9  A: 

try to use in your aspx / ascx file

<%@ import namespace='your namespace' %>

you could also try to import your namespace in the web.config

<system.web>
  <pages>
    <namespaces>
      <add namespace='you namespace' />
    </namespaces>
  </pages>
</system.web>
JSC
A: 

Suppose this is your .Cs file say

namespace MVCTest.Controller {

public class Utility

{ 
   public static void func1()
   {} 
}

}

<%@ import namespace='MVCTest.Controller' %>

Try calling the function by : Utility.func1()

Samiksha