Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. need to be able to search from the textbox if we leave blank space for one character

need to be able to search from the textbox if we leave blank space for one character

Scheduled Pinned Locked Moved Visual Basic
algorithmshelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    subbu sk
    wrote on last edited by
    #1

    Hai all, i have one problem while searching.if i enter letters from the starting of the textbox then i am able to search. ....if i leave the starting of the textbox blank,and then enter letters then i can't able to search. Thanks in advance

    Thanks Subbu.

    M 1 Reply Last reply
    0
    • S subbu sk

      Hai all, i have one problem while searching.if i enter letters from the starting of the textbox then i am able to search. ....if i leave the starting of the textbox blank,and then enter letters then i can't able to search. Thanks in advance

      Thanks Subbu.

      M Offline
      M Offline
      Mbire
      wrote on last edited by
      #2

      A space is a recognised character (Chr 32) so your application is searching for a string that starts with a SPACE. To counter the problem you need remove the leading and or trailing white space by using the String.Trim() method. It removes all the spaces that are not between other Characters. So " this and that " will be changed to "this and that"

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups