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. Web Development
  3. ASP.NET
  4. spacebar problem for insertion

spacebar problem for insertion

Scheduled Pinned Locked Moved ASP.NET
csharphelpasp-netdatabasequestion
3 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.
  • R Offline
    R Offline
    roshid
    wrote on last edited by
    #1

    hai, i am using two textboxes for entering countrycode,country name, entering some datas,i checked the existancy in database,In button click existancy checking is ok but one problem is we use the spacebar first then inserting the duplicate data(using c#,asp.net) for Ex: suppose we insert the data india,ind12 using textboxes after that we connot this insertion here spacebar using infront of the insertion india, ind12 again inserting the duplicate data? how can we avoide this? help me

    S 1 Reply Last reply
    0
    • R roshid

      hai, i am using two textboxes for entering countrycode,country name, entering some datas,i checked the existancy in database,In button click existancy checking is ok but one problem is we use the spacebar first then inserting the duplicate data(using c#,asp.net) for Ex: suppose we insert the data india,ind12 using textboxes after that we connot this insertion here spacebar using infront of the insertion india, ind12 again inserting the duplicate data? how can we avoide this? help me

      S Offline
      S Offline
      SachinKumar M
      wrote on last edited by
      #2

      Trim those Textbox Values Ex: TextBox1.Text.Trim while inserting those values and Checking for Duplicate Data.

      R 1 Reply Last reply
      0
      • S SachinKumar M

        Trim those Textbox Values Ex: TextBox1.Text.Trim while inserting those values and Checking for Duplicate Data.

        R Offline
        R Offline
        roshid
        wrote on last edited by
        #3

        objCity.pvar_City_Name = this.txtCityName.Text.Trim().ToUpper(); objCity.pvar_City_Code = this.txtCityCode.Text.Trim().ToUpper(); i used this code, i cannot get again insert duplicate data

        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