SHOW IF statement Help

Discussion in 'ASP General' started by Simon Gare, Jun 14, 2006.

  1. Simon Gare

    Simon Gare Guest

    Hi,

    how could apply a 'Show IF' statement that would only show an entry if the
    entry was a building name and not a number to the section below.

    <td class="Collection"><span
    class="DataSetText"><%=(Pricing.Fields.Item("COLL_BUILDING_NAME_NO").Value)%
    ></span>



    Example

    want to show 1st line below

    Heathrow Terminal 1 (This is stored in
    Pricing.Fields.Item("COLL_BUILDING_NAME_NO").Value)
    Croydon Road
    Hounslow

    Dont want to show first line below

    23 ( This is also stored in
    Pricing.Fields.Item("COLL_BUILDING_NAME_NO").Value)
    South Audley Street
    London
    W1

    Its just the numbers I dont want to show but i need to see the text.

    Thanks in advance
    Simon
    Simon Gare, Jun 14, 2006
    #1
    1. Advertising

  2. Simon Gare

    Mike Brind Guest

    Simon Gare wrote:
    > Hi,
    >
    > how could apply a 'Show IF' statement that would only show an entry if the
    > entry was a building name and not a number to the section below.
    >
    > <td class="Collection"><span
    > class="DataSetText"><%=(Pricing.Fields.Item("COLL_BUILDING_NAME_NO").Value)%
    > ></span>

    >
    >
    > Example
    >
    > want to show 1st line below
    >
    > Heathrow Terminal 1 (This is stored in
    > Pricing.Fields.Item("COLL_BUILDING_NAME_NO").Value)
    > Croydon Road
    > Hounslow
    >
    > Dont want to show first line below
    >
    > 23 ( This is also stored in
    > Pricing.Fields.Item("COLL_BUILDING_NAME_NO").Value)
    > South Audley Street
    > London
    > W1
    >
    > Its just the numbers I dont want to show but i need to see the text.
    >
    > Thanks in advance
    > Simon


    Regular expressions:

    <%
    Dim str, re, retVal
    str = Pricing.Fields.Item("COLL_BUILDING_NAME_NO").Value
    Set re = new RegExp
    re.Pattern = "[a-z]+"
    re.Global = true
    re.IgnoreCase = true
    retVal = re.Test(str)
    If retVal = true Then Response.Write str
    Set rs = Nothing
    %>

    --
    Mike Brind
    %>
    Mike Brind, Jun 14, 2006
    #2
    1. Advertising

  3. Simon Gare

    Simon Gare Guest

    Thanks Mike,

    Simon


    "Mike Brind" <> wrote in message
    news:...
    >
    > Simon Gare wrote:
    > > Hi,
    > >
    > > how could apply a 'Show IF' statement that would only show an entry if

    the
    > > entry was a building name and not a number to the section below.
    > >
    > > <td class="Collection"><span
    > >

    class="DataSetText"><%=(Pricing.Fields.Item("COLL_BUILDING_NAME_NO").Value)%
    > > ></span>

    > >
    > >
    > > Example
    > >
    > > want to show 1st line below
    > >
    > > Heathrow Terminal 1 (This is stored in
    > > Pricing.Fields.Item("COLL_BUILDING_NAME_NO").Value)
    > > Croydon Road
    > > Hounslow
    > >
    > > Dont want to show first line below
    > >
    > > 23 ( This is also stored in
    > > Pricing.Fields.Item("COLL_BUILDING_NAME_NO").Value)
    > > South Audley Street
    > > London
    > > W1
    > >
    > > Its just the numbers I dont want to show but i need to see the text.
    > >
    > > Thanks in advance
    > > Simon

    >
    > Regular expressions:
    >
    > <%
    > Dim str, re, retVal
    > str = Pricing.Fields.Item("COLL_BUILDING_NAME_NO").Value
    > Set re = new RegExp
    > re.Pattern = "[a-z]+"
    > re.Global = true
    > re.IgnoreCase = true
    > retVal = re.Test(str)
    > If retVal = true Then Response.Write str
    > Set rs = Nothing
    > %>
    >
    > --
    > Mike Brind
    > %>
    >
    Simon Gare, Jun 14, 2006
    #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. Replies:
    3
    Views:
    785
  2. Jay McGavren
    Replies:
    11
    Views:
    1,104
    Alan Krueger
    Jan 16, 2006
  3. tedsuzman
    Replies:
    2
    Views:
    7,055
    Michel Claveau, résurectionné d'outre-bombe inform
    Jul 21, 2004
  4. Ted
    Replies:
    1
    Views:
    448
    Duncan Booth
    Jul 22, 2004
  5. Replies:
    21
    Views:
    1,027
    Giannis Papadopoulos
    Aug 2, 2005
Loading...

Share This Page