text wont format from a form - email

Discussion in 'ASP General' started by Advo, Aug 9, 2006.

  1. Advo

    Advo Guest

    Hi there, basically ive got a script which takes information from a
    form, passes it to the .asp page and then emails a certain department.

    This is what im getting in the emails: notice how the AddyLine 2 is
    over, <it needs a space> and the same for Addy Line 4.

    Address:::

    Addy Line 1, Addy 2nd
    Addy Line 2, Addy 3rd
    Addy Line 3 addy 4th

    It should look like:

    Address:::

    Addy Line 1, Addy 2nd
    Addy Line 2, Addy 3rd
    Addy Line 3 addy 4th

    See how its all aligned now.

    This is the code thats used:

    " Address::: " & VbCrLf & VbCrLf & " " & Request.Form("address") & _
    VbCrLf & _
    VbCrLf & _

    Any ideas please?

    Muchly apreciated
     
    Advo, Aug 9, 2006
    #1
    1. Advertising

  2. Advo

    Mike Brind Guest

    Advo wrote:
    > Hi there, basically ive got a script which takes information from a
    > form, passes it to the .asp page and then emails a certain department.
    >
    > This is what im getting in the emails: notice how the AddyLine 2 is
    > over, <it needs a space> and the same for Addy Line 4.
    >
    > Address:::
    >
    > Addy Line 1, Addy 2nd
    > Addy Line 2, Addy 3rd
    > Addy Line 3 addy 4th
    >
    > It should look like:
    >
    > Address:::
    >
    > Addy Line 1, Addy 2nd
    > Addy Line 2, Addy 3rd
    > Addy Line 3 addy 4th
    >
    > See how its all aligned now.
    >
    > This is the code thats used:
    >
    > " Address::: " & VbCrLf & VbCrLf & " " & Request.Form("address") & _
    > VbCrLf & _
    > VbCrLf & _
    >
    > Any ideas please?
    >


    Ermm... Get rid of the space? No. Sorry. That answer is so
    blindingly obvious I must have missed something...

    --
    Mike Brind
     
    Mike Brind, Aug 9, 2006
    #2
    1. Advertising

  3. Advo

    Advo Guest

    we need the first space, but we also need the other spaces for the
    other lines too, so each line has a space.


    Mike Brind wrote:
    > Advo wrote:
    > > Hi there, basically ive got a script which takes information from a
    > > form, passes it to the .asp page and then emails a certain department.
    > >
    > > This is what im getting in the emails: notice how the AddyLine 2 is
    > > over, <it needs a space> and the same for Addy Line 4.
    > >
    > > Address:::
    > >
    > > Addy Line 1, Addy 2nd
    > > Addy Line 2, Addy 3rd
    > > Addy Line 3 addy 4th
    > >
    > > It should look like:
    > >
    > > Address:::
    > >
    > > Addy Line 1, Addy 2nd
    > > Addy Line 2, Addy 3rd
    > > Addy Line 3 addy 4th
    > >
    > > See how its all aligned now.
    > >
    > > This is the code thats used:
    > >
    > > " Address::: " & VbCrLf & VbCrLf & " " & Request.Form("address") & _
    > > VbCrLf & _
    > > VbCrLf & _
    > >
    > > Any ideas please?
    > >

    >
    > Ermm... Get rid of the space? No. Sorry. That answer is so
    > blindingly obvious I must have missed something...
    >
    > --
    > Mike Brind
     
    Advo, Aug 10, 2006
    #3
  4. Advo

    Mike Brind Guest

    You didn't provide the code to show us what you did with the second and
    third lines. Since these are the ones you are having trouble with,
    sight of your code would be useful.

    --
    Mike Brind

    Advo wrote:
    > we need the first space, but we also need the other spaces for the
    > other lines too, so each line has a space.
    >
    >
    > Mike Brind wrote:
    > > Advo wrote:
    > > > Hi there, basically ive got a script which takes information from a
    > > > form, passes it to the .asp page and then emails a certain department.
    > > >
    > > > This is what im getting in the emails: notice how the AddyLine 2 is
    > > > over, <it needs a space> and the same for Addy Line 4.
    > > >
    > > > Address:::
    > > >
    > > > Addy Line 1, Addy 2nd
    > > > Addy Line 2, Addy 3rd
    > > > Addy Line 3 addy 4th
    > > >
    > > > It should look like:
    > > >
    > > > Address:::
    > > >
    > > > Addy Line 1, Addy 2nd
    > > > Addy Line 2, Addy 3rd
    > > > Addy Line 3 addy 4th
    > > >
    > > > See how its all aligned now.
    > > >
    > > > This is the code thats used:
    > > >
    > > > " Address::: " & VbCrLf & VbCrLf & " " & Request.Form("address") & _
    > > > VbCrLf & _
    > > > VbCrLf & _
    > > >
    > > > Any ideas please?
    > > >

    > >
    > > Ermm... Get rid of the space? No. Sorry. That answer is so
    > > blindingly obvious I must have missed something...
    > >
    > > --
    > > Mike Brind
     
    Mike Brind, Aug 10, 2006
    #4
  5. Advo

    Advo Guest

    That is the only code thats in place at the moment. i can change it,
    but this is the first time ive looked at it really.

    all that does is really look after the first line then i take it, so is
    there a way i can acomodate for aditional lines by new lines or by
    commas, depending on how they decide to use the text area.

    Thanks for the time!


    Mike Brind wrote:
    > You didn't provide the code to show us what you did with the second and
    > third lines. Since these are the ones you are having trouble with,
    > sight of your code would be useful.
    >
    > --
    > Mike Brind
    >
    > Advo wrote:
    > > we need the first space, but we also need the other spaces for the
    > > other lines too, so each line has a space.
    > >
    > >
    > > Mike Brind wrote:
    > > > Advo wrote:
    > > > > Hi there, basically ive got a script which takes information from a
    > > > > form, passes it to the .asp page and then emails a certain department.
    > > > >
    > > > > This is what im getting in the emails: notice how the AddyLine 2 is
    > > > > over, <it needs a space> and the same for Addy Line 4.
    > > > >
    > > > > Address:::
    > > > >
    > > > > Addy Line 1, Addy 2nd
    > > > > Addy Line 2, Addy 3rd
    > > > > Addy Line 3 addy 4th
    > > > >
    > > > > It should look like:
    > > > >
    > > > > Address:::
    > > > >
    > > > > Addy Line 1, Addy 2nd
    > > > > Addy Line 2, Addy 3rd
    > > > > Addy Line 3 addy 4th
    > > > >
    > > > > See how its all aligned now.
    > > > >
    > > > > This is the code thats used:
    > > > >
    > > > > " Address::: " & VbCrLf & VbCrLf & " " & Request.Form("address") & _
    > > > > VbCrLf & _
    > > > > VbCrLf & _
    > > > >
    > > > > Any ideas please?
    > > > >
    > > >
    > > > Ermm... Get rid of the space? No. Sorry. That answer is so
    > > > blindingly obvious I must have missed something...
    > > >
    > > > --
    > > > Mike Brind
     
    Advo, Aug 10, 2006
    #5
  6. Advo

    Mike Brind Guest

    Huh? How do you get the second and third line to display then? I
    mean, the issue you described in the OP was that your lines (plural)
    were not aligning, is that right? If so, you could only know that if
    you were writing more than one line?

    <quote>

    This is what im getting in the emails: notice how the AddyLine 2 is
    over, <it needs a space> and the same for Addy Line 4.

    Address:::

    Addy Line 1, Addy 2nd
    Addy Line 2, Addy 3rd
    Addy Line 3 addy 4th

    <end quote>

    Have I entered the twilight zone? I really have missed something,
    haven't I?

    --
    Mike Brind

    Advo wrote:
    > That is the only code thats in place at the moment. i can change it,
    > but this is the first time ive looked at it really.
    >
    > all that does is really look after the first line then i take it, so is
    > there a way i can acomodate for aditional lines by new lines or by
    > commas, depending on how they decide to use the text area.
    >
    > Thanks for the time!
    >
    >
    > Mike Brind wrote:
    > > You didn't provide the code to show us what you did with the second and
    > > third lines. Since these are the ones you are having trouble with,
    > > sight of your code would be useful.
    > >
    > > --
    > > Mike Brind
    > >
    > > Advo wrote:
    > > > we need the first space, but we also need the other spaces for the
    > > > other lines too, so each line has a space.
    > > >
    > > >
    > > > Mike Brind wrote:
    > > > > Advo wrote:
    > > > > > Hi there, basically ive got a script which takes information from a
    > > > > > form, passes it to the .asp page and then emails a certain department.
    > > > > >
    > > > > > This is what im getting in the emails: notice how the AddyLine 2 is
    > > > > > over, <it needs a space> and the same for Addy Line 4.
    > > > > >
    > > > > > Address:::
    > > > > >
    > > > > > Addy Line 1, Addy 2nd
    > > > > > Addy Line 2, Addy 3rd
    > > > > > Addy Line 3 addy 4th
    > > > > >
    > > > > > It should look like:
    > > > > >
    > > > > > Address:::
    > > > > >
    > > > > > Addy Line 1, Addy 2nd
    > > > > > Addy Line 2, Addy 3rd
    > > > > > Addy Line 3 addy 4th
    > > > > >
    > > > > > See how its all aligned now.
    > > > > >
    > > > > > This is the code thats used:
    > > > > >
    > > > > > " Address::: " & VbCrLf & VbCrLf & " " & Request.Form("address") & _
    > > > > > VbCrLf & _
    > > > > > VbCrLf & _
    > > > > >
    > > > > > Any ideas please?
    > > > > >
    > > > >
    > > > > Ermm... Get rid of the space? No. Sorry. That answer is so
    > > > > blindingly obvious I must have missed something...
    > > > >
    > > > > --
    > > > > Mike Brind
     
    Mike Brind, Aug 10, 2006
    #6
  7. Advo

    Advo Guest

    i'll start again lol, sorry for all the confusion.

    Basically, the address is stored in one variable, and we currently use
    the code:

    " Address::: " & VbCrLf & VbCrLf & " " & Request.Form("address") & _
    VbCrLf & _
    VbCrLf & _



    The way the other fields are set up, is that each line has a space
    before it, such as:

    Field1
    Field2
    Field3

    but now because the address is out of line, its doing:

    Field1
    Field2
    Field3
    AddressLine1
    AddressLine2
    AddressLine3

    If that makes any sense.

    Basically i want to make it so that any lines after the addressLine1
    also have spaces, which would result in an entry like:

    Field1
    Field2
    Field3
    AddressLine1
    AddressLine2
    AddressLine3


    Cheers
     
    Advo, Aug 11, 2006
    #7
  8. "Advo" <> wrote in message
    news:...
    > i'll start again lol, sorry for all the confusion.
    >
    > Basically, the address is stored in one variable, and we currently use
    > the code:
    >
    > " Address::: " & VbCrLf & VbCrLf & " " & Request.Form("address") & _
    > VbCrLf & _
    > VbCrLf & _
    >
    >
    >
    > The way the other fields are set up, is that each line has a space
    > before it, such as:
    >
    > Field1
    > Field2
    > Field3
    >
    > but now because the address is out of line, its doing:
    >
    > Field1
    > Field2
    > Field3
    > AddressLine1
    > AddressLine2
    > AddressLine3
    >
    > If that makes any sense.
    >
    > Basically i want to make it so that any lines after the addressLine1
    > also have spaces, which would result in an entry like:
    >
    > Field1
    > Field2
    > Field3
    > AddressLine1
    > AddressLine2
    > AddressLine3
    >
    >
    > Cheers
    >


    Replace(Request.Form("address") , vbCrLf, " " & vbCrLf)
     
    Anthony Jones, Aug 11, 2006
    #8
  9. Advo

    Mike Brind Guest

    Anthony Jones wrote:
    > "Advo" <> wrote in message
    > news:...
    > > i'll start again lol, sorry for all the confusion.
    > >
    > > Basically, the address is stored in one variable, and we currently use
    > > the code:
    > >
    > > " Address::: " & VbCrLf & VbCrLf & " " & Request.Form("address") & _
    > > VbCrLf & _
    > > VbCrLf & _
    > >
    > >
    > >
    > > The way the other fields are set up, is that each line has a space
    > > before it, such as:
    > >
    > > Field1
    > > Field2
    > > Field3
    > >
    > > but now because the address is out of line, its doing:
    > >
    > > Field1
    > > Field2
    > > Field3
    > > AddressLine1
    > > AddressLine2
    > > AddressLine3
    > >
    > > If that makes any sense.
    > >
    > > Basically i want to make it so that any lines after the addressLine1
    > > also have spaces, which would result in an entry like:
    > >
    > > Field1
    > > Field2
    > > Field3
    > > AddressLine1
    > > AddressLine2
    > > AddressLine3
    > >
    > >
    > > Cheers
    > >

    >
    > Replace(Request.Form("address") , vbCrLf, " " & vbCrLf)


    Surely Replace(Request.Form("address") , vbCrLf, vbCrLf & " " ) ? I
    believe the OP wants to indent each line one space, not add a space
    before the line break.

    --
    Mike Brind
     
    Mike Brind, Aug 11, 2006
    #9
  10. "Mike Brind" <> wrote in message
    news:...
    >
    > Anthony Jones wrote:
    > > "Advo" <> wrote in message
    > > news:...
    > > > i'll start again lol, sorry for all the confusion.
    > > >
    > > > Basically, the address is stored in one variable, and we currently use
    > > > the code:
    > > >
    > > > " Address::: " & VbCrLf & VbCrLf & " " & Request.Form("address") & _
    > > > VbCrLf & _
    > > > VbCrLf & _
    > > >
    > > >
    > > >
    > > > The way the other fields are set up, is that each line has a space
    > > > before it, such as:
    > > >
    > > > Field1
    > > > Field2
    > > > Field3
    > > >
    > > > but now because the address is out of line, its doing:
    > > >
    > > > Field1
    > > > Field2
    > > > Field3
    > > > AddressLine1
    > > > AddressLine2
    > > > AddressLine3
    > > >
    > > > If that makes any sense.
    > > >
    > > > Basically i want to make it so that any lines after the addressLine1
    > > > also have spaces, which would result in an entry like:
    > > >
    > > > Field1
    > > > Field2
    > > > Field3
    > > > AddressLine1
    > > > AddressLine2
    > > > AddressLine3
    > > >
    > > >
    > > > Cheers
    > > >

    > >
    > > Replace(Request.Form("address") , vbCrLf, " " & vbCrLf)

    >
    > Surely Replace(Request.Form("address") , vbCrLf, vbCrLf & " " ) ? I
    > believe the OP wants to indent each line one space, not add a space
    > before the line break.


    oops well spotted :)

    >
    > --
    > Mike Brind
    >
     
    Anthony Jones, Aug 11, 2006
    #10
    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. Jack Wheeler

    form wont validate on remote server

    Jack Wheeler, Jun 14, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    298
    George
    Jun 14, 2004
  2. =?Utf-8?B?QWRyaWFu?=

    Asp.net wont validate form

    =?Utf-8?B?QWRyaWFu?=, May 13, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    486
    =?Utf-8?B?QWRyaWFu?=
    May 13, 2005
  3. TS
    Replies:
    3
    Views:
    354
    =?Utf-8?B?VFM=?=
    Oct 6, 2006
  4. rote
    Replies:
    8
    Views:
    777
Loading...

Share This Page