Inserting ASP code from a database

Results 1 to 6 of 6

Thread: Inserting ASP code from a database

  1. #1
    Join Date
    Dec 1969
    Posts
    1,671

    Default Inserting ASP code from a database

    I have a webpage that get some of it&#039s content (HTML code) from a database. When I include ASP code in the content (loaded from the database), ASP ignore these codes. Any one have any tips.<BR><BR>Thanks<BR> Mike

  2. #2
    John Weeflaar Guest

    Default RE: Inserting ASP code from a database

    Would you show us the code for that?<BR>I might/ might not be able to answer though.<BR>

  3. #3
    Join Date
    Dec 1969
    Posts
    1,019

    Default RE: Inserting ASP code from a database

    I think the problem is writing code at the time of execution:<BR>The steps IIS performs:<BR>1. ASP page is requested<BR>2. ASP page executes<BR>-Writing the asp retrieved from the database will not execute since the execution already took place. (I think)<BR>A solution would be using include files:<BR>1 Store the asp in the database<BR>2. At run time write the asp code into the include file<BR>3. The next line calls the include file, which executes on the server.<BR>More on includes:<BR>http://www.4guysfromrolla.com/webtech/080199-1.shtml

  4. #4
    John Weeflaar Guest

    Default RE: Inserting ASP code from a database

    Thanks to Leo for answering this from the Server side perspective. <BR>If I can add this from the client side perspective:<BR>When you bring HTML strings from server to client (either stored in database or variables), it&#039ll be interpreted at client and you see the visual effect of it.<BR>When you bring ASP strings/code (eg, stored in database) to client, the client is unable to interprete these strings, and so the ASP code strings have no effect at client side.<BR>Hope the two answers help.<BR><BR>John


  5. #5
    Join Date
    Dec 1969
    Posts
    1,671

    Default RE: Inserting ASP code from a database

    Thanks John. Was out the net for a while. I think I&#039ll go with Leo&#039s example.<BR><BR>L8r<BR> Mike

  6. #6
    Join Date
    Dec 1969
    Posts
    1,671

    Default RE: Inserting ASP code from a database

    Thanks Leo. I was out the net for while...<BR>I&#039ll try that, plus I think there&#039s an article (? Author on this site) that covers static pages (generated form a database).<BR><BR>Thanks again.<BR><BR>Mike

Posting Permissions

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