Link to home
Start Free TrialLog in
Avatar of pythaguras
pythaguras

asked on

ASP variable help in compiled DLL

Ok, I'm attempting to compile my ASP scripts into a component.

However, I've run into a problem... I have an include file called siteSetting.asp that holds all of the variables specific to that website.  It includes the number of records to display per page, row colors, etc. etc. etc... How can I use those variables within the functions in my compiled DLL?  I can't seem to get it to work, and I haven't a clue as to what to search for!

TIA
Avatar of Amro Osama
Amro Osama
Flag of Egypt image

look try to save those variables in the web.config file instead of using a .ASP file
add this section to your web.config File :

  <appSettings>
    <add key="SqlCommand1.CommandText" value="SELECT * from Employee;" />
    <add key="RecordDisplayPerPage" value="20" />
    <add key="AdminPWD" value="Xzuf11" />
    <add key="AdminTextClr" value="BLUE" />
  </appSettings>

Avatar of pythaguras
pythaguras

ASKER

I'm using ASP 3.0 not .NET
sorry ,, :) wrong version wrong guy :P
Create properties in your DLL and pass that values into your DLL from your configuration asp page.
I've done that, but is there any other way to do it?  
That would be the best way to approach it.  I can't think of anything more direct.  Other option would be to put these configurations in a database or other like storage that you could then access directly from your ASP pages, or from your DLL.
Ok, I've figured out a workaround.

First, I made an entire include that passess all of the values to corresponding properties in the DLL. Then, I made the values for all of those parameters (on the previous include) equal to the values in the ASP page; the constants.  That way, there is only one page that controls the variables for the entire site.  

Thanks guys for all your help and suggestions!
Pleaes close this and refund my points.
ASKER CERTIFIED SOLUTION
Avatar of PashaMod
PashaMod

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial