Including an ASP page in an HTML page

Results 1 to 3 of 3

Thread: Including an ASP page in an HTML page

  1. #1
    Bob Sewell Guest

    Default Including an ASP page in an HTML page

    Does anyone know if it&#039s possible to use the #include command in an HTML page to call an ASP page?<BR><BR>I&#039ve got a big page that doesn&#039t change much (hense it&#039s an HTML file) but there is a small section of it that needs to be dynamic. I tried writing an ASP page to return the dynamic information, and then use the include statement in the HTML page to call it, but all I ever get is the source of the ASP page.<BR><BR>Any ideas???<BR><BR>Thanks in advance,<BR><BR>Bob

  2. #2
    Join Date
    Dec 1969
    Posts
    940

    Default RE: Including an ASP page in an HTML page

    This is not possible to my knowledge. All the pages with the include would have to be asp pages.

  3. #3
    Join Date
    Dec 1969
    Posts
    2,849

    Default RE: Including an ASP page in an HTML page

    When you include a file, it is as if you had just typed the file you are including into the file you are including it from. So, if you were to write a page with a .HTM extension like this:<BR><BR>&#060;HTML><BR>&#060;BODY><BR>&#060;% Resopnse.Write Date &#037;&#062;<BR>&#060;/BODY><BR>&#060;/HTML><BR><BR>You would see the ASP code, because the file is a .htm, not a .asp. So, if you include a file with ASP code in it, it&#039s just like having typed it in, so if the file that&#039s doing the include is not a .asp page, the asp commands will go unparsed. Hope this makes sense!<BR><BR>Here is an article which talks about using includes:<BR>http://4guysfromrolla.com/webtech/faq/Beginner/faq6.shtml<BR><BR>Good luck and Happy Programming!

Posting Permissions

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