1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

.asp / blogger.com brain scratcher...

Discussion in 'C#' started by grobar, Jun 1, 2006.

  1. #1
    I have an .asp file that generates a nav menu.

    I have tried and tried to "include" this in the blogger template, so that I can update the menu dynamically, without fiddling with a cumbersome blogger template all of the time.

    The question is, does anyone know how I can "call" this file in to the template successfully?

    I have tried using <script> tags: something like:

    <script type="text/javascript" src="http://url.com/menu.asp"></script>

    But had no success.

    Does anyone know how I can accomplish this?
     
    grobar, Jun 1, 2006 IP
  2. Free Born John

    Free Born John Guest

    Messages:
    111
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    if it's an asp file you want to include then try

    <!--#include file=myfile.asp-->

    better still name it as "myfile.asa" as that's the convention for asp includes ( I believe)

    regards
     
    Free Born John, Jun 1, 2006 IP
  3. grobar

    grobar Well-Known Member

    Messages:
    642
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    140
    #3
    the blogger system doesn't like that method of includes.

    that didn't work.

    I know the .asp page works, as I use it on the main site with no problems.
     
    grobar, Jun 1, 2006 IP
  4. Mystique

    Mystique Well-Known Member

    Messages:
    2,579
    Likes Received:
    94
    Best Answers:
    2
    Trophy Points:
    195
    #4
    Mystique, Jun 1, 2006 IP
  5. grobar

    grobar Well-Known Member

    Messages:
    642
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    140
    #5
    I've figured this out! (with the help of ChrisHirst over at tek-tips)

    See this article:

    http://www.4guysfromrolla.com/webtech/110100-1.shtml

    In short, I had to let the .asp page do its processing on the server, then capture the output using xmlhttp requests.

    the code I specifically used, was this: (saved on my server as an .asp file, then called as an include in the blogger template.)

    <%
      Response.Buffer = True
      Dim objXMLHTTP, xml
    
      ' Create an xmlhttp object:
      Set xml = Server.CreateObject("Microsoft.XMLHTTP")
      ' Or, for version 3.0 of XMLHTTP, use:
      ' Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP")
    
      ' Opens the connection to the remote server.
      xml.Open "GET", "http://www.mysite.com/menu.asp", False
    	
      ' Actually Sends the request and returns the data:
      xml.Send
    
      Response.Write xml.responseText
     
      
      Set xml = Nothing
    %>
    
    
    Code (markup):
    Since the processing and output of this page is just html, blogger has no problems with it. Thanks for the nudge in the right direction.
     
    grobar, Jun 1, 2006 IP
  6. bowoekowidodo

    bowoekowidodo Guest

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Pleasa ! your source code include here. or edit content type
     
    bowoekowidodo, Jun 20, 2006 IP
  7. grobar

    grobar Well-Known Member

    Messages:
    642
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    140
    #7
    If anyone still wants the solution to this, PM me, and i'll send the sourcecode.
     
    grobar, Jul 4, 2006 IP