Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Easy or Difficult?

Status
Not open for further replies.

Pandyon

Programmer
Feb 21, 2001
38
US
Using ASP (vbscript) pages for a website. Have multiple search forms. Example: Search Form #1 takes user criteria then submits to Page 2. Page 2 does the following:

1. Creates the WHERE clause of my SQL string with the user's criteria (validating and creating proper syntax).

2. Opens Access Database and retrieves Recordset of user's criteria.

So in Page 2, I have this extensive coding to parse my SQL string. I've created an ASP component (search.dll) function of this string to speed it up, but my web host won't allow custom components on their site. Is there any other way, using a standard web host, that I can move this coding into a function and/or compile it for speed and reuse? Or do I have to put the coding on the submitted page of every search form I have?

One more thing...I'm using vbScript not Javascript.

Thanks,

Mark
 
Here are some suggestions:

You can use include files to include another ASP page within a page. It is the same idea with JavaScript script includes. (Do not use any <%@ %> commands in includes)
<!--INCLUDE FILE=&quot;../file/file.asp&quot; -->

You can use Visual Basic subs fine in ASP code for code resuablity as well.

So, you could create an asp page that only had the sub function that you want to use, then use an include file on all your search pages so that it's available to them.

Hope that helps. Harold Blackorby
hblackorby@scoreinteractive.com
St. Louis, MO
 

Yes, that definitely helps for reusability, but it doesn't speed things up does it?

It was so nice putting things as compiled components for speed and reuse. Just wish there was another way.

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top