string problem

Discussion in 'ASP General' started by Jamie Fryatt, Feb 5, 2004.

  1. Jamie Fryatt

    Jamie Fryatt Guest

    quick one please guys

    this wont work can you hlep me with it please, what extra bits do i have to
    add in to make it work?

    thanks

    <%
    dim fs,f
    dim siteid
    dim year
    dim country
    strsiteid = request.querystring("siteid")
    stryear = request.querystring("year")
    strcountry = request.querystring("country")
    set fs=Server.CreateObject("Scripting.FileSystemObject")
    set
    f=fs.CreateFolder("C:\www\images\<%=strsiteid%>\<%=stryear%>\<%=strcountry%>
    ")
    set f=nothing
    set fs=nothing
    %>

    Microsoft VBScript compilation error '800a0409'
    Unterminated string constant

    /v4/admin/contestants_create.asp, line 27

    set f=fs.CreateFolder("C:\iFtpSvc\NS4\users\world\www\images\<%=strsiteid
    -------------------------------------------------------------------------^
    Jamie Fryatt, Feb 5, 2004
    #1
    1. Advertising

  2. Jamie Fryatt

    Ray at Guest

    You use <% %> when you're writing ASP code interlaced with HTML. Like:

    <table>
    <tr>
    <td>Your name is <%=yourNameVariable%></td>
    </tr>
    </table>

    When you're writing ASP code already within the <% %> blocks, you'd just
    want to concatenate your strings and variables like:

    <%
    sFolderToCreate = "C:\www\images\" & strsiteid & "\" & stryear & "\" &
    strcountry
    SET f=fs.CreateFolder(sFolderToCreate)
    %>

    Note the usage of SET also, for object variables.

    Ray at work



    "Jamie Fryatt" <> wrote in message
    news:bvtkt9$t19$...
    > quick one please guys
    >
    > this wont work can you hlep me with it please, what extra bits do i have

    to
    > add in to make it work?
    >
    > thanks
    >
    > <%
    > dim fs,f
    > dim siteid
    > dim year
    > dim country
    > strsiteid = request.querystring("siteid")
    > stryear = request.querystring("year")
    > strcountry = request.querystring("country")
    > set fs=Server.CreateObject("Scripting.FileSystemObject")
    > set
    >

    f=fs.CreateFolder("C:\www\images\<%=strsiteid%>\<%=stryear%>\<%=strcountry%>
    > ")
    > set f=nothing
    > set fs=nothing
    > %>
    >
    > Microsoft VBScript compilation error '800a0409'
    > Unterminated string constant
    >
    > /v4/admin/contestants_create.asp, line 27
    >
    > set f=fs.CreateFolder("C:\iFtpSvc\NS4\users\world\www\images\<%=strsiteid
    > -------------------------------------------------------------------------^
    >
    >
    Ray at, Feb 5, 2004
    #2
    1. Advertising

  3. Jamie Fryatt

    Jamie Fryatt Guest

    thanks for your help.


    "Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
    message news:#dAB3i$...
    > You use <% %> when you're writing ASP code interlaced with HTML. Like:
    >
    > <table>
    > <tr>
    > <td>Your name is <%=yourNameVariable%></td>
    > </tr>
    > </table>
    >
    > When you're writing ASP code already within the <% %> blocks, you'd just
    > want to concatenate your strings and variables like:
    >
    > <%
    > sFolderToCreate = "C:\www\images\" & strsiteid & "\" & stryear & "\" &
    > strcountry
    > SET f=fs.CreateFolder(sFolderToCreate)
    > %>
    >
    > Note the usage of SET also, for object variables.
    >
    > Ray at work
    >
    >
    >
    > "Jamie Fryatt" <> wrote in message
    > news:bvtkt9$t19$...
    > > quick one please guys
    > >
    > > this wont work can you hlep me with it please, what extra bits do i have

    > to
    > > add in to make it work?
    > >
    > > thanks
    > >
    > > <%
    > > dim fs,f
    > > dim siteid
    > > dim year
    > > dim country
    > > strsiteid = request.querystring("siteid")
    > > stryear = request.querystring("year")
    > > strcountry = request.querystring("country")
    > > set fs=Server.CreateObject("Scripting.FileSystemObject")
    > > set
    > >

    >

    f=fs.CreateFolder("C:\www\images\<%=strsiteid%>\<%=stryear%>\<%=strcountry%>
    > > ")
    > > set f=nothing
    > > set fs=nothing
    > > %>
    > >
    > > Microsoft VBScript compilation error '800a0409'
    > > Unterminated string constant
    > >
    > > /v4/admin/contestants_create.asp, line 27
    > >
    > > set

    f=fs.CreateFolder("C:\iFtpSvc\NS4\users\world\www\images\<%=strsiteid
    >
    > -------------------------------------------------------------------------^
    > >
    > >

    >
    >
    Jamie Fryatt, Feb 5, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mladen Adamovic
    Replies:
    0
    Views:
    718
    Mladen Adamovic
    Dec 4, 2003
  2. Mladen Adamovic
    Replies:
    3
    Views:
    14,547
    Mladen Adamovic
    Dec 5, 2003
  3. Matt
    Replies:
    3
    Views:
    471
    Tor Iver Wilhelmsen
    Sep 17, 2004
  4. Bruce Sam
    Replies:
    15
    Views:
    7,852
    John C. Bollinger
    Nov 19, 2004
  5. =?Utf-8?B?UmFqZXNoIHNvbmk=?=

    'System.String[]' from its string representation 'String[] Array'

    =?Utf-8?B?UmFqZXNoIHNvbmk=?=, May 4, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    1,782
    =?Utf-8?B?UmFqZXNoIHNvbmk=?=
    May 4, 2006
Loading...

Share This Page