global.asax file

ramanaths

Member
Joined
May 31, 2005
Messages
19
Programming Experience
Beginner
Hi

I have 2 web pages that use 3 common functions. this i have in a separate file and compile it as a dll. my global.asax looks like this...

HTML:
<object id="StringCollection" runat="server" class="TestApplication.MyClass" scope="Application" />

in my pages a.aspx.cs and b.aspx.cs i have the following code:
VB.NET:
Dim status As Boolean = StringCollection.SendEmailToFriend("abc@xyz.com", _
"pqr@pqr.com", Session("Email").ToString(), "Test Mail", "This is a test mail !!!")

my email.dll has the coding for SendEmailToFriend function.

now if i have it this way is the processing of the pages going to be slow because of the dll reference in global.asax. or is it better to have the dll reference only in the cs files that invoke the function?

thnx
RamS
 
Last edited by a moderator:
I don't think there will be any performance problems as long as the Class is not using a lot of resources. Becuase in that case, all the resources being used by the class will have to stay in memory as it is in an application scope which might lead to performance problems.

So, if that is a simple class then your approch should be fine.
 
Back
Top