how to do : response.write "<%=rs("request1")%>" ?

Discussion in 'C#' started by JJnacy, May 19, 2008.

  1. #1
    <% if n=5 then

    newfile.WriteLine "<%=rs("request1")%>"

    end if %>

    Why it doesn't work?

    Help me.
     
    JJnacy, May 19, 2008 IP
  2. rkstech

    rkstech Active Member

    Messages:
    195
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    73
    #2
    its very simple

    Try this
    <% if n=5 then

    newfile.WriteLine rs("request1")

    end if %>

    The reason being you cannot have 2 script one under the other

    let me know if you need any help with ASP
     
    rkstech, May 19, 2008 IP
  3. dylanj

    dylanj Peon

    Messages:
    173
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    0
    #3
    
    <% if n=5 then
    
    newfile.WriteLine rs("request1")
    
    end if %>
    
    Code (markup):
    Yup, that'll work
     
    dylanj, May 19, 2008 IP
  4. jawahar

    jawahar Active Member

    Messages:
    1,044
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    95
    #4
    If you want to print the recodset field value, then you can seen dyland rks example.

    But if you want to print as you have asked, then :

    <% if n=5 then
    newfile.WriteLine "&lt;%=rs("request1")%&gt;"
    end if %>
     
    jawahar, May 25, 2008 IP
  5. MatthewDP

    MatthewDP Member

    Messages:
    40
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #5
    classic asp....spooky :)
     
    MatthewDP, May 26, 2008 IP
  6. dylanj

    dylanj Peon

    Messages:
    173
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    0
    #6
    It's still good, it's still good... :)
     
    dylanj, May 26, 2008 IP
  7. rkstech

    rkstech Active Member

    Messages:
    195
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    73
    #7
    Love Classic ASP
     
    rkstech, May 28, 2008 IP