Sansari71
Jan 12th, 2005, 11:18 AM
I am developing a web application in ASP.Net. I have some functions that are common so I decided to create a commoncode.cs file. At first I tried to add this file using
<%@page src="commoncode.cs" inherits="Commoncode" %>
It didn't work as any function that I was calling form this file was not recognized. I did some research on this web site and decided to create a dll and saved that dll in the bin folder. I then added a reference to this dll to the web application and added this line
using Commoncode;
whereever I needed this file. When I tried to build it, I am now getting this error:
A using namespace directive can only be applied to namespaces; 'Commoncode' is a class not a namespace
Can someone tell me what I am doing wrong? I am using C#. Thanks
<%@page src="commoncode.cs" inherits="Commoncode" %>
It didn't work as any function that I was calling form this file was not recognized. I did some research on this web site and decided to create a dll and saved that dll in the bin folder. I then added a reference to this dll to the web application and added this line
using Commoncode;
whereever I needed this file. When I tried to build it, I am now getting this error:
A using namespace directive can only be applied to namespaces; 'Commoncode' is a class not a namespace
Can someone tell me what I am doing wrong? I am using C#. Thanks