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,