Solved

ASP variable help in compiled DLL

Posted on 2004-04-26
10
165 Views
Last Modified: 2010-05-02
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
Comment
Question by:pythaguras
  • 4
  • 2
  • 2
  • +1
10 Comments
 
LVL 7

Expert Comment

by:OHDev2004
ID: 10923522
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
 

Author Comment

by:pythaguras
ID: 10923534
I'm using ASP 3.0 not .NET
0
 
LVL 7

Expert Comment

by:OHDev2004
ID: 10923538
sorry ,, :) wrong version wrong guy :P
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 28

Expert Comment

by:AzraSound
ID: 10924778
Create properties in your DLL and pass that values into your DLL from your configuration asp page.
0
 

Author Comment

by:pythaguras
ID: 10924788
I've done that, but is there any other way to do it?  
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 10924817
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
 

Author Comment

by:pythaguras
ID: 10924835
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
 

Author Comment

by:pythaguras
ID: 10999178
Pleaes close this and refund my points.
0
 

Accepted Solution

by:
PashaMod earned 0 total points
ID: 11057716
Closed, 125 points refunded.
PashaMod
Community Support Moderator
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question