Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 176
  • Last Modified:

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
0
pythaguras
Asked:
pythaguras
  • 4
  • 2
  • 2
  • +1
1 Solution
 
OHDev2004Commented:
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>

0
 
pythagurasAuthor Commented:
I'm using ASP 3.0 not .NET
0
 
OHDev2004Commented:
sorry ,, :) wrong version wrong guy :P
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
AzraSoundCommented:
Create properties in your DLL and pass that values into your DLL from your configuration asp page.
0
 
pythagurasAuthor Commented:
I've done that, but is there any other way to do it?  
0
 
AzraSoundCommented:
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.
0
 
pythagurasAuthor Commented:
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!
0
 
pythagurasAuthor Commented:
Pleaes close this and refund my points.
0
 
PashaModCommented:
Closed, 125 points refunded.
PashaMod
Community Support Moderator
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now