Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to use custom utility classes in Asp.net and C#

Posted on 2004-04-13
1
Medium Priority
?
338 Views
Last Modified: 2006-11-17
Hi,
I am a newbie to .net.   I am developing a small app with asp.net and C#.   I am NOT using visual studio.net.  

My question is:  I would like to write a small utility class with application wide functions.  All the C# files so far have been compiled from aspx.  Should I compile this util class into a .dll?  Please give me a good example / link of how to compile and bind custom c# classes to an aspx page

thanks,
sk

0
Comment
Question by:skotamraju
1 Comment
 
LVL 15

Accepted Solution

by:
OMC2000 earned 2000 total points
ID: 10812082
yes, you shuld compile utility class(es) into an assembly  .DLL. Then you'll be able to use them in your code behind .cs files or at server scripts as standard .NET classes. You should add

using assembly_name

line to your code code behind files (.aspx.cs).

And add

<%@ Import Namespace="aseemply_name" %>

to .ASPX files

You could look at

Microsoft.NET\Framework\SDK\Samples\Quickstart\aspplus\samples\webforms\busobjs

on your computer.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question