!--#include file

Results 1 to 2 of 2

Thread: !--#include file

  1. #1
    Join Date
    Dec 1969

    Default !--#include file

    Hi, i am developing in ASP. I have two pages, 1)Is a Form that submits 3 variables, MemberID, StartDate and EndDate.<BR>The Second ASP takes these variables and returns a recordset and produces a Dynamic Table.<BR>Instead of going to the second page to view the results, i would like to include the page results in the 1st page form.<BR>My results work fine when going to the second page, when i try and use the include method like so on the first, the page does&#039;nt work.<BR>&#060;td width="50%" height="23"&#062;<BR> &#060;!--#include file="profilerProductMix.asp"--&#062;<BR>&#060;/td&#062;<BR>I believe this is because when the 1st page is displayed for the first time there is no result yet as i have not submitted any variables to it.<BR>My Form Action for the first page is;<BR>&#060;form name="formProfile" action="profilerProcessMix.asp"&#062;<BR>Can i use the include function to return the dynamic results of the second page within the 1st page on submitting?

  2. #2
    Join Date
    Dec 1969

    Default You have two problems here...

    ... The first one is that your second page will have all the &#060;HTML&#062;, &#060;HEAD&#062; and &#060;BODY&#062; tags which are required for a standard HTML page. You don&#039;t want these if you include the page into another one. Although most browsers will still render the page properly, it&#039;s NOT compliant with HTML standards and some browsers may fail to display the page.<BR><BR>Secondly, you&#039;re obviously doing something wrong when displaying the results and probably aren&#039;t checking if the resulting recordset is empty or not. Without knowing the actual error message, this is hard to tell.<BR><BR>In theory you should be able to change your &#060;FORM&#062; action to point to the first page and then use an &#060;!--#include&#062; tag to include the second page - after you have removed the surplus tags and corrected your code to check for an empty recordset.<BR><BR>Show us the error messages and the RELEVANT code and we might be able to help.<BR><BR>Oliver.

Posting Permissions

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