Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: IIS Application state variable vs Global variable from DLL assembly


Message #1 by "hkwan" <hkwan99@y...> on Tue, 28 Aug 2001 06:39:43
Hi all,



I want to have constant values to be shared by all the ASPX files in the

entire web application.



Would like to know in term of performance :- memory usage & speed &

scalability on these two methods  as below:



1) Using IIS application state variables set in global.asax and used by 

ASPX as below :

  e.g. <% response.write (  Application["Message"] ) %>



2) Using DLL assembly and import the namespace in any of the ASPX file that

needs to use the variables.

e.g.

    <%@  import  Namespace="Global.ConstData"  % >

    <% response.write ( Message.ErrorMsg()  ) %>



whereby

in the DLL source :

namespace Global.ConstData

class Message

{

public constat String ErroMsg = "Error :-   01000 - blah blah ";

}



Which one better ?

Thanks,




  Return to Index