asp slows right down with html put in page

Results 1 to 2 of 2

Thread: asp slows right down with html put in page

  1. #1
    Join Date
    Dec 1969
    Posts
    590

    Default asp slows right down with html put in page

    This is only a problem with NScape. <BR>Compare www.globalstocksearch.com/search3.asp with ....search4.asp <BR>They call results3/4.asp. <BR>The only difference in the pages is the insertion of a single table with "search results" text in it. <BR>The performance is hugely slowed down - 6 seconds or so. <BR>To really kill NS try search2.asp. <BR>PLease please help. <BR>The code I am using is: <BR><BR><BR>&#060;% <BR>keywordinput = request.form ("keywordinput") <BR>Manufacturer = request.form ("Manufacturer") <BR>PartNumber = Request.form("PartNumber") <BR>OrderMultiple = Request.form("OrderMultiple") <BR>ProductGroup = Request.form("ProductGroup") <BR>SubProductGroup = request.form ("SubProductGroup") <BR>Supplier = Request.form("Supplier") <BR>Description = Request.form("Description") <BR>PackType = Request.form("PackType") <BR>DiscountPrice = Request.form("DiscountPrice") <BR>OrderBy = Request.form("OrderBy") <BR>%&#062; <BR>&#060;html&#062; <BR><BR>&#060;head&#062; <BR>&#060;title&#062;Search Results2&#060;/title&#062; <BR>&#060;/head&#062; <BR><BR>&#060;body background="images/Back.gif" topmargin="0" leftmargin="0"&#062; <BR>&#060;!--#INCLUDE VIRTUAL="/ADOVBS.INC" --&#062; <BR>&#060;div align="left"&#062; <BR>------------------------------- <BR>&#060;% <BR>connectme="DSN=stock" <BR>sqltemp = "SELECT Manufacturer, PartNumber, ExcessStkQty, Supplier, PriceEach, Description, recno FROM stocktable WHERE keywords LIKE &#039%" & keywordinput & "%&#039 AND Manufacturer LIKE &#039%" & Manufacturer & "%&#039 AND PartNumber LIKE &#039%" & PartNumber & "%&#039 AND ProductGroup LIKE &#039%" & ProductGroup & "%&#039 AND SubProductGroup LIKE &#039%" & SubProductGroup & "%&#039 AND Supplier LIKE &#039%" & Supplier & "%&#039 AND Description LIKE &#039%" & Description & "%&#039 AND PackType LIKE &#039%" & PackType & "%&#039 AND DiscountPrice LIKE &#039%" & DiscountPrice & "%&#039 ORDER BY ExcessStkQty DESC " <BR><BR><BR>mypage=request("whichpage") <BR>If mypage="" then <BR>mypage=1 <BR>end if <BR>mypagesize=request("pagesize") <BR>If mypagesize="" then <BR>mypagesize=10 <BR>end if <BR>mySQL=request("SQLquery") <BR>IF mySQL="" THEN <BR>mySQL=SQLtemp <BR>END IF <BR><BR>set rstemp=Server.CreateObject("ADODB.Recordset") <BR>rstemp.cursorlocation=aduseclient <BR>rstemp.cachesize=5 <BR>rstemp.open mySQL,connectme <BR>rstemp.movefirst <BR>rstemp.pagesize=mypagesize <BR>maxpages=cint(rstemp.pagecount) <BR>maxrecs=cint(rstemp.pagesize) <BR>rstemp.absolutepage=mypage <BR>howmanyrecs=0 <BR>howmanyfields=rstemp.fields.count -1 <BR>response.write "Page " & mypage & " of " & maxpages & "<BR>" <BR>response.write "&#060;table border=&#039 1&#039&#062;&#060;tr&#062;" <BR>&#039Put Headings On The Table of Field Names <BR>FOR i=0 to howmanyfields <BR>response.write "&#060;td&#062;&#060;b&#062;" & rstemp(i).name & "&#060;/b&#062;&#060;/td&#062;" <BR>NEXT <BR>response.write "&#060;/tr&#062;" <BR>&#039 Now loop through the data <BR>DO UNTIL rstemp.eof OR howmanyrecs&#062;=maxrecs <BR>response.write "&#060;tr&#062;" <BR>FOR i = 0 to howmanyfields <BR>fieldvalue=rstemp(i) <BR>If isnull(fieldvalue) THEN <BR>fieldvalue="n/a" <BR>END IF <BR>If trim(fieldvalue)="" THEN <BR>fieldvalue="&nbsp;" <BR>END IF <BR>response.write "&#060;td valign=&#039top&#039&#062;" <BR>response.write fieldvalue <BR>response.write "&#060;/td&#062;" <BR>next <BR>response.write "&#060;/tr&#062;" <BR>rstemp.movenext <BR>howmanyrecs=howmanyrecs+1 <BR>LOOP <BR>response.write "&#060;/table&#062;&#060;p&#062;" <BR>&#039 close, destroy <BR>rstemp.close <BR>set rstemp=nothing <BR>&#039 Now make the page _ of _ hyperlinks <BR>pad="0" <BR>scriptname=request.servervariables("script_nam e") <BR>for counter=1 to maxpages <BR>If counter&#062;=10 then <BR>pad="" <BR>end if <BR>ref="&#060;a href=&#039" & scriptname <BR>ref=ref & "?whichpage=" & counter <BR>ref=ref & "&pagesize=" & mypagesize <BR>ref=ref & "&sqlQuery=" & server.URLencode(mySQL) <BR>ref=ref & "&#039&#062;" & pad & counter & "&#060;/a&#062;" <BR>response.write ref & " " <BR>if counter mod 10 = 0 then <BR>response.write "<BR>" <BR>end if <BR>next <BR><BR>%&#062;

  2. #2
    Join Date
    Dec 1969
    Posts
    590

    Default The Solution

    I found that tables and most importantly, nested tables really stuffed NS up. - Don&#039t use them!<BR>Cheers all.<BR>Solution at search5.asp

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •