Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 14th, 2005, 07:07 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default Line continuation character in ASP

Code:
<% if right(new_string_date,1) = "," then response.write left(new_string_date,len(new_string_date)-1) elseif right(new_string_date,3) = ", -" then response.write left(new_string_date,len(new_string_date)-1) else response.write new_string_date end if %>
How do i bring this down to a new line?

Line continuation character?

www.crmpicco.co.uk
www.crmpicco.co.uk.tt
www.milklemonadechocolate.uk.tt
www.griswolds.uk.tt
www.piccosmini.co.uk.tt
www.morton.uk.tt
__________________
_______________________
Ayrshire Minis - a Mini E-Community
http://www.ayrshireminis.com
http://www.crmpicco.co.uk
 
Old June 14th, 2005, 07:09 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

with that code i am getting this error, why?:

Error Type:
Microsoft VBScript compilation (0x800A0401)
Expected end of statement
/mackenzie/asp/display_fare_search3adv_zone.asp, line 299, column 99
if right(new_string_date,1) = "," then response.write left(new_string_date,len(new_string_date)-1) elseif right(new_string_date,3) = ", -" then response.write left(new_string_date,len(new_string_date)-1) else response.write new_string_date end if


www.crmpicco.co.uk
www.crmpicco.co.uk.tt
www.milklemonadechocolate.uk.tt
www.griswolds.uk.tt
www.piccosmini.co.uk.tt
www.morton.uk.tt
 
Old June 14th, 2005, 08:02 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

I don't think you can use ElseIf in a one line If statement, can't you just code:
Code:
if right(new_string_date,1) = "," then 
    response.write left(new_string_date,len(new_string_date)-1) 
elseif right(new_string_date,3) = ", -" then 
    response.write left(new_string_date,len(new_string_date)-1) 
else 
    response.write new_string_date 
end if
HTH,

Chris

 
Old June 20th, 2005, 04:57 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

Code:
set rstripmaster = con.execute("update trip_master set " _ 
                              & "adt_pct_markup = '" & adt_pct_markup & "' and "_
                              & "chd_pct_markup = '" & chd_pct_markup & "' and "_
                              & "inf_pct_markup = '" & inf_pct_markup & "' where trip_id = '" & pwspnr & "'")
www.crmpicco.co.uk
www.crmpicco.co.uk.tt
www.milklemonadechocolate.uk.tt
www.griswolds.uk.tt
www.piccosmini.co.uk.tt
www.morton.uk.tt





Similar Threads
Thread Thread Starter Forum Replies Last Post
XML parsing: line 1, character 38, unable to switc prafullaborade XML 2 May 22nd, 2008 06:21 AM
alert continuation mcauliff Other Programming Languages 0 February 1st, 2007 09:15 AM
character count of ms-word in asp.net sh.rajkumar ASP.NET 1.0 and 1.1 Professional 0 May 19th, 2006 07:24 AM
newbie help - inserting new line character briforge XSLT 5 September 7th, 2005 07:49 AM
Character base printing in ASP adityabuxar Classic ASP Basics 0 January 5th, 2005 03:16 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.