Solved

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

Posted on 2004-04-13
1
316 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 500 total points
Comment Utility
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 run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

763 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now