Link to home
Start Free TrialLog in
Avatar of dtolo
dtolo

asked on

Query String from url into variables

I need to store the results of a url querystring into variables

I get the results

<%=Request.QueryString("ClassName") %>
<%=Request.QueryString("DaysAndTimes") %>

Just fine.  Now i need to combine them with a record set drawn from a SQL table, and pop them into another one.

The problem is that when I select the db record the page refreshes and I loose my url query string.

So I'm thinking that after I get my url querystring I should pop them into variable right away so that I dont loose the url querystring.  Then I'll be able to use the values..


How does that sound?

How do I do it?

Thanks
~David
ASKER CERTIFIED SOLUTION
Avatar of dwaldner
dwaldner

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of peh803
your suggestion sounds like it could work, although there are easier / different ways to do this.  What I understand to be your problem is that the user has done a search (let me know if this isn't the case) on Class Name and / or Days and Times.  When you display the results, the user can click a record.  When the user clicks a record, you're just redirecting to some other page, and you lose the search criteria.  Before I go too much further, are these assumptions correct?
if this is the case, just putting them into variables isn't going to persist them through round trips to the server, as you probably know.  I really like the method dwaldner uses, though -- the eval() command isn't used enough in asp.  

At any rate, without storing the criteria in session variables for every user and every search, you'd have to keep passing around the querystring, or posting hidden form values.  I suppose you could serialize the values to a db for later retrieval...it's all based on how you want to do it.  

If you give me more information about this application, I can suggest an easy approach.
just take the value of the querystring and pop it into a hidden field in a form.  That way everytime the page is reloaded, the form hidden field still has that variable waiting for you.
Avatar of dtolo
dtolo

ASKER

Peh803

 it is actually a link on a calendar that takes the ClassName DaysAndTimes Fields and passes them to another page that is connected to a SQL db that the user can select his employee number from, make his record active, then choose to add himself plus the classname and daysandtimes value to a register table.

dwaldner this sounds good!

I am a beginer so you are going to have to break it down for me.  what are the Variable Names for ClassName and DaysAndTimes going to be once they are generated from this routine?
I would store the query strings into hidden form fields.
So your <form> on the page needs hidden fields for every parameter value you like to store and your ASP needs to overwrite the values of those fields only if the query string parameters are present.

Do you need an example?

if keeping the same querystring when you submit the form is all you want, do this:

<form method="POST" action="page.asp?<%=request.querystring%>">
...
....
...
</form>

This will pass both the querystring AND the form data (I do this on a VERY regular basis).  

Dan
Avatar of dtolo

ASKER

Flow79  I tried that but it didn't work
Ok, Dan's idea is better :)
well, show me your code so that i can see why it isnt working, because it will (i do it all the time) - you just have to code it properly
If you want the values to be available in all future pages simply add them to the seesion variables collection.

eg.

<%
Session ("ClassName") = Request.QueryString("ClassName")
Session ("DaysAndTimes") = Request.QueryString("DaysAndTimes")
%>

Regards.

@dtolo

From the routine that I gave you (the for loop), that will take the querystring variable and make it a page variable, so rather than typing in Request.Querystring("foo1") you can simply type in foo1 to access the information from the querystring.

If you need anything else, just post...

Dan
Watch putting the contents of the variable into a session variable...while it is an easy fix to the problem you're having, it will put a LOT of unnecessary strain on your server if your site is a popular one.
If you use the Session Object to retrieve the values in future pages: <% Response.Write (Session("Variablename")) %>

To amend the value: <% Session("Variablename") = <AnotherVariable/Value> %>

To Destroy the Session (Clear all session variables): Session.Abandon()

Regards.
Maybe you should have them choose everything on the first page. ClassName, DaysAndTimes, and employee#.
I agree with posters who are against overuse of the session...probably not necessary in this case.  

One obvious limitation to putting the querystring in the form's action is that for any redirection you want to do, you have to post the form.  That said, it's a great method -- I do use this method a lot.  

It's either that, or if you want to redirect manually (using an <a> tag, etc), you'll have to append the querystring to each href.

Make sense?  So, as long as you do this to all forms:

<form action="thispage.asp?<%=request.querystring%>"

and this to all links:
<a href="nextPage.asp?<%=requeset.querystring%>">go to next page</a>

you should never have to worry about losing your querystring.  Using a function to build the links with the querystring added on might be useful to you as well.  

Regards,
peh803
such a function might look like this:

function getQSLink(sUrl, sLabel, sOtherLinkAttributes)

  'sOtherLinkAttributes would be used for any class declarations for your link, id attrubutes, in-line style declarations, etc.

  Dim sRetVal, sQSAdder
  sQSAdder = "?"
  if instr(sUrl, "?")>0 then
    'if user is passing a link to this function with a querystring already in it, we want to use an ampersand instead of a ?
    sQSAdder = "&"
  end if

  sQSAdder = sQSAdder & request.querystring
  sRetVal = "<a href="""&uUrl&sQSAdder&" "&sOtherLinkAttributes&">"&sLabel&"</a>"
  getQSLink = sRetVal

end function

You could call it like this:

<%=getQSLink("NextPage.asp", "Go To The Next Page!!", "style=""font-weight:bold;text-decoration:none;font-family:helvetica""")%>

regards,
peh803
Avatar of dtolo

ASKER

Man you guys have a lot of great Ideas.  It's going to take me a while to sort this all out and figure out who to award points to.  I'm a little emabarrased to post my code because it's in front page and will probably loose you (it's kind of proprietary)

Judging from what you guys said it should work and I can't see why it doesn't I have a lot more to go on now.  I grabed a query parser that's in the head of the first page, it has to be very easy for my end users to create the URL.

Any way the user would clisk on a url that looks something like.  http://zeusdev/cssd/prototype/ta/default.asp?ClassName=Handcuff Training&DaysAndTimes=080222004"


That will take them to a page that looks like this:

<html>

<head>
<% ' FP_ASP -- ASP Automatically generated by a Frontpage Component. Do not Edit.
FP_CharSet = "windows-1252"
FP_CodePage = 1252 %>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Register For Class</title>


<script Language="JavaScript">
//
// QueryString
//

function QueryString(key)
{
      var value = null;
      for (var i=0;i<QueryString.keys.length;i++)
      {
            if (QueryString.keys[i]==key)
            {
                  value = QueryString.values[i];
                  break;
            }
      }
      return value;
}
QueryString.keys = new Array();
QueryString.values = new Array();

function QueryString_Parse()
{
      var query = window.location.search.substring(1);
      var pairs = query.split("&");
      
      for (var i=0;i<pairs.length;i++)
      {
            var pos = pairs[i].indexOf('=');
            if (pos >= 0)
            {
                  var argname = pairs[i].substring(0,pos);
                  var value = pairs[i].substring(pos+1);
                  QueryString.keys[QueryString.keys.length] = argname;
                  QueryString.values[QueryString.values.length] = value;            
            }
      }

}

QueryString_Parse();
</script>
  </head>

<body>

<% If request("Submit") <> "" Then %>





<table>
     <tbody>
          <!--webbot bot="DatabaseRegionStart" s-columnnames="StudentID,EmployeeNumber,FirstName,LastName,Address,City,StateOrProvince,PostalCode,PhoneNumber,Major,Email,ThirdName,FourthName,Address1,Address2,Town,State,Zip,PhoneExtension" s-columntypes="3,202,200,200,200,202,202,202,202,202,200,200,200,200,200,200,200,200,200" s-dataconnection="TA-UPDATE" b-tableformat="TRUE" b-menuformat="FALSE" s-menuchoice s-menuvalue b-tableborder="FALSE" b-tableexpand="FALSE" b-tableheader="FALSE" b-listlabels="TRUE" b-listseparator="TRUE" i-listformat="0" b-makeform="FALSE" s-recordsource="Students" s-displaycolumns="EmployeeNumber" s-criteria="[EmployeeNumber] EQ {EmployeeNumber} +" s-order s-sql="SELECT * FROM Students WHERE (EmployeeNumber =  '::EmployeeNumber::')" b-procedure="FALSE" clientside suggestedext="asp" s-defaultfields="EmployeeNumber=" s-norecordsfound="No records returned." i-maxrecords="0" i-groupsize="0" botid="0" u-dblib="../_fpclass/fpdblib.inc" u-dbrgn1="../_fpclass/fpdbrgn1.inc" u-dbrgn2="../_fpclass/fpdbrgn2.inc" tag="TBODY" preview="&lt;tr&gt;&lt;td colspan=64 bgcolor=&quot;#FFFF00&quot; width=&quot;100%&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;This is the start of a Database Results region.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;" startspan --><!--#include file="../_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM Students WHERE (EmployeeNumber =  '::EmployeeNumber::')"
fp_sDefault="EmployeeNumber="
fp_sNoRecords="<tr><td colspan=1 align=""LEFT"" width=""100%"">No records returned.</td></tr>"
fp_sDataConn="TA-UPDATE"
fp_iMaxRecords=0
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&StudentID=3&EmployeeNumber=202&FirstName=200&LastName=200&Address=200&City=202&StateOrProvince=202&PostalCode=202&PhoneNumber=202&Major=202&Email=200&ThirdName=200&FourthName=200&Address1=200&Address2=200&Town=200&State=200&Zip=200&PhoneExtension=200&"
fp_iDisplayCols=1
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="50921" -->

<%
'Add additional fields as necessary
varLname = fp_rs("LastName")
varFname = fp_rs("FirstName")
varEmpNum = fp_rs("EmployeeNumber")
varEmail = fp_rs("Email")
%>
<tr>
     <td width="50%">Last Name</td>
     <td width="50%"><%=fp_rs("LastName")%></td>
</tr>
<tr>
     <td width="50%">First Name
     <td width="50%"><%=fp_rs("FirstName")%></td>
</tr>
<tr>
     <td width="50%">Employee Number
     <td width="50%"><%=fp_rs("EmployeeNumber")%></td>
</tr>
<tr>
     <td width="50%">Email Address
     <td width="50%"><%=fp_rs("Email")%></td>
</tr>
<tr>
  <td width="50%">Class Name
     <td width="50%"><%=Request.QueryString("ClassName") %></td>
</tr>
<tr>
  <td width="50%">Date
     <td width="50%"><%=Request.QueryString("DaysAndTimes") %></td>
</tr>
<tr>
     <td width="100%" colspan="2" align="center">Is this information correct?</td>
</tr>
<!--webbot bot="DatabaseRegionEnd" b-tableformat="TRUE" b-menuformat="FALSE" u-dbrgn2="../_fpclass/fpdbrgn2.inc" i-groupsize="0" clientside tag="TBODY" preview="&lt;tr&gt;&lt;td colspan=64 bgcolor=&quot;#FFFF00&quot; width=&quot;100%&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;This is the end of a Database Results region.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;" startspan --><!--#include file="../_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-checksum="56926" --></tbody>
</table>
<table align="center">
     <tr>
          <td>
<form action="page3.asp">
<input type="hidden" value="<%=varLname%>" name="LastName">
<input type="hidden" value="<%=varFname%>" name="FirstName">
<input type="hidden" value="<%=varEmpNum%>" name="EmployeeNumber">
<input type="hidden" value="<%=varEmail%>" name="Email">
<input type="hidden" value="<%=request.querystring("ClassName")%>"
name="ClassName">
<input type="hidden" value="<%= request.querystring("DatesAndTimes")%>"
name="DateAndTime">
<input type="submit" value="Yes - Continue With Registraton"
name="SubmitReg">
</form>
          </td>
          <td>
<form action="javascript:history.go(-1)">
<input type="submit" value="No - Return to Selection Form" name="Return">
</form>
          </td>
</tr>
</table>

<% Else %>
<form
action="default.asp?ClassName=<%=request.querystring("ClassName")%>&DateAndT
ime=<%=request.querystring("DateAndTime")%>">
     <nobr>
     <!--webbot bot="DatabaseRegionStart" s-columnnames="EmployeeNumber,FirstName,LastName,Email" s-columntypes="202,200,200,200" s-dataconnection="TA-UPDATE" b-tableformat="FALSE" b-menuformat="TRUE" s-menuchoice="EmployeeNumber" s-menuvalue="EmployeeNumber" b-tableborder="TRUE" b-tableexpand="TRUE" b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE" i-listformat="0" b-makeform="FALSE" s-recordsource s-displaycolumns="EmployeeNumber,FirstName,LastName,Email" s-criteria s-order s-sql="SELECT     EmployeeNumber, FirstName, LastName, Email&lt;br&gt;FROM Students&lt;br&gt;WHERE (EmployeeNumber IS NOT NULL) ORDER BY EmployeeNumber ASC" b-procedure="FALSE" clientside suggestedext="asp" s-defaultfields s-norecordsfound="No records returned." i-maxrecords="0" i-groupsize="0" botid="1" u-dblib="../_fpclass/fpdblib.inc" u-dbrgn1="../_fpclass/fpdbrgn1.inc" u-dbrgn2="../_fpclass/fpdbrgn2.inc" preview=" &lt;span style=&quot;color: rgb(0,0,0); background-color: rgb(255,255,0)&quot;&gt;Database&lt;/span&gt; " startspan --><!--#include file="../_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT     EmployeeNumber, FirstName, LastName, Email FROM Students WHERE (EmployeeNumber IS NOT NULL) ORDER BY EmployeeNumber ASC"
fp_sDefault=""
fp_sNoRecords="No records returned."
fp_sDataConn="TA-UPDATE"
fp_iMaxRecords=0
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=True
fp_sMenuChoice="EmployeeNumber"
fp_sMenuValue="EmployeeNumber"
fp_sColTypes="&EmployeeNumber=202&FirstName=200&LastName=200&Email=200&"
fp_iDisplayCols=4
fp_fCustomQuery=True
BOTID=1
fp_iRegion=BOTID
%>
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="26131" --><select NAME="EmployeeNumber" SIZE="1">
            <!--webbot bot="AspInclude" clientside u-incfile="../_fpclass/fpdbrgn1.inc" startspan --><!--#include file="../_fpclass/fpdbrgn1.inc"--><!--webbot bot="AspInclude" endspan i-checksum="52766" -->
            <option><%=FP_FieldHTML(fp_rs,"EmployeeNumber")%></option>
            <!--webbot bot="AspInclude" clientside u-incfile="../_fpclass/fpdbrgn2.inc" startspan --><!--#include file="../_fpclass/fpdbrgn2.inc"--><!--webbot bot="AspInclude" endspan i-checksum="52830" -->
            </select><!--webbot bot="DatabaseRegionEnd" b-tableformat="FALSE" b-menuformat="TRUE" u-dbrgn2="../_fpclass/fpdbrgn2.inc" i-groupsize="0" clientside preview=" &lt;span style=&quot;color: rgb(0,0,0); background-color: rgb(255,255,0)&quot;&gt;Results&lt;/span&gt; " startspan --><!--webbot bot="DatabaseRegionEnd" endspan -->
     <input type="submit" value="Submit" name="Submit"></nobr></form>
<% End if %>

</body>


</html>

This page runs a series of routines and then is supposed to post to send the data to the following page which adds a record to another table using the data from the url string + the employe table:

<html>

<head>
<% ' FP_ASP -- ASP Automatically generated by a Frontpage Component. Do not Edit.
FP_CharSet = "windows-1252"
FP_CodePage = 1252 %>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>You Have been registered for your class!</title>
</head>

<body>

<table>
      <tbody>
            <!--webbot bot="DatabaseRegionStart" s-columnnames s-columntypes s-dataconnection="TA-UPDATE" b-tableformat="TRUE" b-menuformat="FALSE" s-menuchoice s-menuvalue b-tableborder="FALSE" b-tableexpand="FALSE" b-tableheader="FALSE" b-listlabels="TRUE" b-listseparator="TRUE" i-listformat="0" b-makeform="FALSE" s-recordsource s-displaycolumns s-criteria s-order s-sql="INSERT INTO Register (LastName, FirstName, EmployeeNumber, Email, ClassName, DaysAndTimes) VALUES ('::LastName::', '::FirstName::', '::EmployeeNumber::', '::Email::', '::ClassName::', '::DaysAndTimes::')" b-procedure="FALSE" clientside suggestedext="asp" s-defaultfields="LastName=&amp;amp;FirstName=&amp;amp;EmployeeNumber=&amp;amp;Email=&amp;amp;ClassName=&amp;amp;DaysAndTimes=" s-norecordsfound="You Have Succefully Registered For: " i-maxrecords="256" i-groupsize="0" botid="0" u-dblib="../_fpclass/fpdblib.inc" u-dbrgn1="../_fpclass/fpdbrgn1.inc" u-dbrgn2="../_fpclass/fpdbrgn2.inc" tag="TBODY" preview="&lt;tr&gt;&lt;td colspan=64 bgcolor=&quot;#FFFF00&quot; width=&quot;100%&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;This is the start of a Database Results region.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;" startspan b-UseDotNET="FALSE" CurrentExt sa-InputTypes b-DataGridFormat="FALSE" b-DGridAlternate="TRUE" sa-CritTypes b-WasTableFormat="TRUE" --><!--#include file="../_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="INSERT INTO Register (LastName, FirstName, EmployeeNumber, Email, ClassName, DaysAndTimes) VALUES ('::LastName::', '::FirstName::', '::EmployeeNumber::', '::Email::', '::ClassName::', '::DaysAndTimes::')"
fp_sDefault="LastName=&FirstName=&EmployeeNumber=&Email=&ClassName=&DaysAndTimes="
fp_sNoRecords="<tr><td colspan=16 align=""LEFT"" width=""100%"">You Have Succefully Registered For: </td></tr>"
fp_sDataConn="TA-UPDATE"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&"
fp_iDisplayCols=16
fp_fCustomQuery=True
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="43361" --><!--webbot bot="DatabaseRegionEnd" b-tableformat="TRUE" b-menuformat="FALSE" u-dbrgn2="../_fpclass/fpdbrgn2.inc" i-groupsize="0" clientside tag="TBODY" preview="&lt;tr&gt;&lt;td colspan=64 bgcolor=&quot;#FFFF00&quot; width=&quot;100%&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;This is the end of a Database Results region.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;" startspan --><!--#include file="../_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-checksum="56926" --></tbody>
</table>

<br><p><b>This is a list of Users Registered for this Class</b></p>
<table>
      <tbody>
            <!--webbot bot="DatabaseRegionStart" s-columnnames="EmployeeNumber,FirstName,LastName,ClassName,DaysAndTimes,Email" s-columntypes="200,202,202,202,135,202" s-dataconnection="TA-UPDATE" b-tableformat="TRUE" b-menuformat="FALSE" s-menuchoice s-menuvalue b-tableborder="FALSE" b-tableexpand="FALSE" b-tableheader="FALSE" b-listlabels="TRUE" b-listseparator="TRUE" i-listformat="0" b-makeform="FALSE" s-recordsource="Register" s-displaycolumns="FirstName,LastName,EmployeeNumber,Email,ClassName,DaysAndTimes" s-criteria s-order="[LastName] + [FirstName] +" s-sql="SELECT * FROM Register ORDER BY LastName ASC,FirstName ASC" b-procedure="FALSE" clientside suggestedext="asp" s-defaultfields s-norecordsfound="No records returned." i-maxrecords="0" i-groupsize="0" botid="1" u-dblib="../_fpclass/fpdblib.inc" u-dbrgn1="../_fpclass/fpdbrgn1.inc" u-dbrgn2="../_fpclass/fpdbrgn2.inc" tag="TBODY" preview="&lt;tr&gt;&lt;td colspan=64 bgcolor=&quot;#FFFF00&quot; width=&quot;100%&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;This is the start of a Database Results region.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;" startspan --><!--#include file="../_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM Register ORDER BY LastName ASC,FirstName ASC"
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=6 align=""LEFT"" width=""100%"">No records returned.</td></tr>"
fp_sDataConn="TA-UPDATE"
fp_iMaxRecords=0
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&EmployeeNumber=200&FirstName=202&LastName=202&ClassName=202&DaysAndTimes=135&Email=202&"
fp_iDisplayCols=6
fp_fCustomQuery=False
BOTID=1
fp_iRegion=BOTID
%>
<!--#include file="../_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="34063" --><tr>
                  <td>
                  <!--webbot bot="DatabaseResultColumn" s-columnnames="EmployeeNumber,FirstName,LastName,ClassName,DaysAndTimes,Email" s-column="FirstName" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="&lt;font size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;FirstName&lt;font size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><%=FP_FieldVal(fp_rs,"FirstName")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="18712" --></td>
                  <td>
                  <!--webbot bot="DatabaseResultColumn" s-columnnames="EmployeeNumber,FirstName,LastName,ClassName,DaysAndTimes,Email" s-column="LastName" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="&lt;font size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;LastName&lt;font size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><%=FP_FieldVal(fp_rs,"LastName")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="14417" --></td>
                  <td>
                  <!--webbot bot="DatabaseResultColumn" s-columnnames="EmployeeNumber,FirstName,LastName,ClassName,DaysAndTimes,Email" s-column="EmployeeNumber" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="&lt;font size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;EmployeeNumber&lt;font size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><%=FP_FieldVal(fp_rs,"EmployeeNumber")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="41846" --></td>
                  <td>
                  <!--webbot bot="DatabaseResultColumn" s-columnnames="EmployeeNumber,FirstName,LastName,ClassName,DaysAndTimes,Email" s-column="Email" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="&lt;font size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Email&lt;font size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><%=FP_FieldVal(fp_rs,"Email")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="8328" --></td>
                  <td>
                  <!--webbot bot="DatabaseResultColumn" s-columnnames="EmployeeNumber,FirstName,LastName,ClassName,DaysAndTimes,Email" s-column="ClassName" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="&lt;font size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;ClassName&lt;font size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><%=FP_FieldVal(fp_rs,"ClassName")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="18883" --></td>
                  <td>
                  <!--webbot bot="DatabaseResultColumn" s-columnnames="EmployeeNumber,FirstName,LastName,ClassName,DaysAndTimes,Email" s-column="DaysAndTimes" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="&lt;font size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;DaysAndTimes&lt;font size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><%=FP_FieldVal(fp_rs,"DaysAndTimes")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="29731" --></td>
            </tr>
            <!--webbot bot="DatabaseRegionEnd" b-tableformat="TRUE" b-menuformat="FALSE" u-dbrgn2="../_fpclass/fpdbrgn2.inc" i-groupsize="0" clientside tag="TBODY" preview="&lt;tr&gt;&lt;td colspan=64 bgcolor=&quot;#FFFF00&quot; width=&quot;100%&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;This is the end of a Database Results region.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;" startspan --><!--#include file="../_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-checksum="56926" --></tbody>
</table>

</body>

</html>


Good luck making heads or tails of this.  It took me quite a while.

~David
haha....digging through all this code reminds me of one of the best movies of all times:

yeah....did you get the memo?  It's just that we're putting coversheets on all our TPS reports........

oh, oh!  And I almost forgot...I'm gonna need you to come in on Sunday, too.   Yeah....we lost some people and we need to play catch up.....

At any rate, see if you can implement the suggestions of the posts here in this question, and award points to whoever you feel deserves the points based on the ideas you use.
Yikes!  Don't worry about FP, though.  I'm sure we've all started there...
PC load letter....PC load letter...
if youre looking to get out of FP - i would suggest using HTML-Kit from Chami (Its Free).  
You can download it at: http://www.chami.com/html-kit/download/
what the **** does PC load letter mean?!?!?!

yeah -- html kit rocks...  Of course, if you have access to it, the VS.NET 2003 development environment is pretty sweet too.  Of course, it's not quite "free". :)

ok people - youre ruining an AMAZING movie!

the quote is:  "PC load letter...what the **** does that mean?"

the full script can be found at: http://blake.prohosting.com/bamzone/office_space_transcript.html
lol...or the best of all time, the very first scene where Michael Bolton is in traffic singing Gangsta Rap, and he turns it down because there's a black guy selling flowers!!!!! ROFL...

Anyways, back to topic, again, just struggle through the code, see what works, and award points to whoever you've used...

Dan
"Michael...Bolton???  Are you any relation to the pop singer??"

okay, I'll stop now.  I just had to get that off my chest.
Avatar of dtolo

ASKER

*lol*You guys are killing me...

I loved office space My favorite part is when the guy is listening to gangsta rap and when he sees the black guy selling flowers he locks the car door.

flow79

you said just take the value of the querystring and pop it into a hidden field in a form.  That way everytime the page is reloaded, the form hidden field still has that variable waiting for you.

How can I tell if the form is actually storing the the query string in the hidden field?  That is what I'm using.

When I put this in my page
<%=Request.QueryString("ClassName") %>
<%=Request.QueryString("DaysAndTimes") %>

I can see the values at brows time.  When i select my dbase record they disapear so i don't think the ever make it into the form.

~David
a very quick implementation of what I was talking about is:

<%
var1 = "Hello World!"
'var1 = Request.QueryString("var1")
%>
<form method="get" action="yourasp.asp">
<input type="hidden" name="yourhiddenfield" value="<%= var1 %>">
<input type="submit" value="Submit">
</form>
<% response.write var1 %>

for your uses, you would uncomment the var1 = Request.QueryString("var1"), and get rid of var1 = "Hello World!"
the only way the value in the form field will be persisted is if the form field itself is actually posted back to the server.  If the form is not posted, and rather the user "clicks the dbase record" as you've been calling it, that's when you would have to use the querystring appending function (or some similar method) that I mentioned earlier this post...
Hi,

Why dont u think of doing this way.

Upon reaching the search page, take the query string collections and put that into a dictionary object and assign it to sesssion variable.
Then from any other page you can simply assign back the session dictionary object collection to a variable n you can use it on current page where ever it is required.
This way only thing that you need to worry about is clearing and re-setting of value for dictionary objects collection in the session variable upon every fresh search.

I hope u know how to manupulate code with Dictionary object collections.

Simple example

Set dctQueryStrings = server.createobject("scripting.dictionary")
for each item in request.querystring
     dctQueryStrings.Add item,request.querystring(item)
next

Session("dctQueryString") = dctQueryStrings

You can assign this Session("dctQueryString") to any one variables like this on the other page

dctQueryStrings = Session("dctQueryString")


Then you can use the vaues like

dctQueryStrings.Item(0).value

I'm sure this will be a one stop solution to ur problem

Thanks & Rgds
Sara
I see it used a lot with but storing the dictionary object in a session variable will cause thread locking and limit scalability.