find if there is a given substring inside a string

Discussion in 'ASP .Net' started by juli, Dec 6, 2004.

  1. juli

    juli Guest

    How do I find if there is a given substring inside a string in asp.net ?
    Thank you very much!
    juli, Dec 6, 2004
    #1
    1. Advertising

  2. String.IndexOf (...);

    Eliyahu

    "juli" <> wrote in message
    news:...
    > How do I find if there is a given substring inside a string in asp.net ?
    > Thank you very much!
    Eliyahu Goldin, Dec 6, 2004
    #2
    1. Advertising

  3. juli

    Deepak Guest

    Use String.IndexOf()

    If it returns -1 then the string you searched for was not found. If anything
    else then it was found.

    --
    Regards,

    Deepak
    [I Code, therefore I am]
    "juli" <> wrote in message
    news:...
    > How do I find if there is a given substring inside a string in asp.net ?
    > Thank you very much!
    Deepak, Dec 6, 2004
    #3
  4. juli

    Shiva Guest

    String.IndexOf()

    "juli" <> wrote in message
    news:...
    How do I find if there is a given substring inside a string in asp.net ?
    Thank you very much!
    Shiva, Dec 6, 2004
    #4
    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. Ajay

    progrm to find a substring in a string

    Ajay, Mar 22, 2006, in forum: C Programming
    Replies:
    28
    Views:
    827
    Default User
    Mar 23, 2006
  2. Replies:
    8
    Views:
    804
  3. Replies:
    1
    Views:
    436
    Terry Reedy
    Jun 22, 2008
  4. fishfry

    Find location of substring in string?

    fishfry, Sep 24, 2004, in forum: Perl Misc
    Replies:
    3
    Views:
    104
    Bart Lateur
    Sep 24, 2004
  5. Replies:
    3
    Views:
    189
    Sherm Pendley
    Aug 3, 2005
Loading...

Share This Page