Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Import a class in ASP.NET

I want to import a class that is in App_Code to use it in my aspx pages.

How can I do it ?

Thanks

like image 596
Wassim AZIRAR Avatar asked May 27 '10 12:05

Wassim AZIRAR


1 Answers

Add the namespace you used to your codebehind file or aspx file(if not using code behind).

using YourNamespace; //C#
imports YourNamespace //VB

or if not using codebehind

<%@ Import Namespace="YourNamespace" %>  
like image 110
sclarson Avatar answered Sep 20 '22 07:09

sclarson