Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2004
    Location
    India
    Posts
    56

    Unanswered: How will be the string compare in ASP

    Dear Friends,

    I want to know,which code has to be used for the string comparison in ASP.

    I have a variable where i am storing the value from a data base


    ie var1=Rs1("uname")

    I have form value in second varaible

    var2=Request.form("name")

    now I want to check text box value with this var1

    So when I am using following code ,its gives error

    If var1=var2 then
    statement
    end if.

    How I can do this checking

    ThanX

    graceson

  2. #2
    Join Date
    Mar 2003
    Location
    Atlanta, GA
    Posts
    191
    What error are you getting?
    Tim

  3. #3
    Join Date
    Jul 2003
    Location
    SoCal
    Posts
    721
    Do you have a period after the "end if" in your code as you do in your example? As MrWizard said, it would be helpful to know what the error is.
    That which does not kill me postpones the inevitable.

  4. #4
    Join Date
    May 2004
    Location
    bangalore
    Posts
    270
    Try this

    If ( strcomp(var1,var2) == 0)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •