Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

ASP variable help in compiled DLL

Posted on 2004-04-26
10
Medium Priority
?
173 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
9 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…
Suggested Courses

824 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