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. Server Side Validation

Server Side Validation

Scheduled Pinned Locked Moved ASP.NET
sysadminhelp
6 Posts 3 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.
  • G Offline
    G Offline
    Gobi madura
    wrote on last edited by
    #1

    Hi, I have to validate the control in server side and have to find which control value is wrong. Ex: im passing user name and password. if password is wrong it should find only the password is wrong, (normally it shows Username or Password is wrong).. Please help me..

    T B 2 Replies Last reply
    0
    • G Gobi madura

      Hi, I have to validate the control in server side and have to find which control value is wrong. Ex: im passing user name and password. if password is wrong it should find only the password is wrong, (normally it shows Username or Password is wrong).. Please help me..

      T Offline
      T Offline
      Tej Aj
      wrote on last edited by
      #2

      U should 1st check if UserName exists in DB if no then return error accordingly. If UserName exists then check for the authenticity of the password for that particular user. U can write a stored proc to check for these conditions Tej Aj, http://opexsolution.com/forum/ Fan of: http://www.abtstudioz.com/

      1 Reply Last reply
      0
      • G Gobi madura

        Hi, I have to validate the control in server side and have to find which control value is wrong. Ex: im passing user name and password. if password is wrong it should find only the password is wrong, (normally it shows Username or Password is wrong).. Please help me..

        B Offline
        B Offline
        Brij
        wrote on last edited by
        #3

        Gobi.madura wrote:

        im passing user name and password. if password is wrong it should find only the password is wrong, (normally it shows Username or Password is wrong)..

        Normally, most of the sites doesn't say whether any specific (username/ password is wrong. They show one of it wrong, might be for hiding the identity. if some hacker try to login with the credential, s/he would not come to know, what is wrong Username or Password. But if you want to implement, then you can implement as Tej suggested.

        Cheers!! Brij My Blog:http://brijbhushan.wordpress.com
        Check my latest Article :ViewState - Various ways to reduce performance overhead

        G 1 Reply Last reply
        0
        • B Brij

          Gobi.madura wrote:

          im passing user name and password. if password is wrong it should find only the password is wrong, (normally it shows Username or Password is wrong)..

          Normally, most of the sites doesn't say whether any specific (username/ password is wrong. They show one of it wrong, might be for hiding the identity. if some hacker try to login with the credential, s/he would not come to know, what is wrong Username or Password. But if you want to implement, then you can implement as Tej suggested.

          Cheers!! Brij My Blog:http://brijbhushan.wordpress.com
          Check my latest Article :ViewState - Various ways to reduce performance overhead

          G Offline
          G Offline
          Gobi madura
          wrote on last edited by
          #4

          Ya Thank you. I understood the security problem but the requirement is the following : Tej said checking username and then password, I hope it makes 2 round trip to verify the username and password. So that i created a array list and added the username and password in it And concadinated those two values seperated by comma and stored in a string vriable and passed the string to the DB(For avoiding multiple round trip). It works perfectly for the username and password verfication. But the requirement is to validate multiple text box in server side, When i go for the same approach for this DB doesn't know Which control holds what value and while returning back am facing control mapping problems. Please do the needful

          B 1 Reply Last reply
          0
          • G Gobi madura

            Ya Thank you. I understood the security problem but the requirement is the following : Tej said checking username and then password, I hope it makes 2 round trip to verify the username and password. So that i created a array list and added the username and password in it And concadinated those two values seperated by comma and stored in a string vriable and passed the string to the DB(For avoiding multiple round trip). It works perfectly for the username and password verfication. But the requirement is to validate multiple text box in server side, When i go for the same approach for this DB doesn't know Which control holds what value and while returning back am facing control mapping problems. Please do the needful

            B Offline
            B Offline
            Brij
            wrote on last edited by
            #5

            Gobi.madura wrote:

            But the requirement is to validate multiple text box in server side, When i go for the same approach for this DB doesn't know Which control holds what value and while returning back am facing control mapping problems.

            See, you have to validate the multiple textboxes, So you have to have some mapping between the textboxes and the data in DB. I didn't get without this mapping how are you validating it( Might be I didn't get your requirement fully). Just have some data in some pair ( like tb1,tb1data) to map the textbox and data and according validate and populate.

            Cheers!! Brij My Blog:http://brijbhushan.wordpress.com
            Check my latest Article :ViewState - Various ways to reduce performance overhead

            G 1 Reply Last reply
            0
            • B Brij

              Gobi.madura wrote:

              But the requirement is to validate multiple text box in server side, When i go for the same approach for this DB doesn't know Which control holds what value and while returning back am facing control mapping problems.

              See, you have to validate the multiple textboxes, So you have to have some mapping between the textboxes and the data in DB. I didn't get without this mapping how are you validating it( Might be I didn't get your requirement fully). Just have some data in some pair ( like tb1,tb1data) to map the textbox and data and according validate and populate.

              Cheers!! Brij My Blog:http://brijbhushan.wordpress.com
              Check my latest Article :ViewState - Various ways to reduce performance overhead

              G Offline
              G Offline
              Gobi madura
              wrote on last edited by
              #6

              Ya i am facing the problem in mapping the control with its value only. But do you think what am trying to do is good and will it be secure and efficeint. Because if i do server side validation it makes round trip as well as security problem as u said. I need some suggestion regarding my requirment and the approach.

              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