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. if the value is 0..

if the value is 0..

Scheduled Pinned Locked Moved ASP.NET
csharphelptutorialvisual-studioquestion
5 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.
  • C Offline
    C Offline
    chubbie
    wrote on last edited by
    #1

    hi all.. thanks for the attention to this post.. i am facing some difficulty with my project and i need help. example, i have 3 textboxes (unitPrice, quantity and grandTotal) and a button (nextBtn). when the application is running, the user will key in some value inside unitPrice and quantity (for multiplication).. and the grandTotal will auto compute the product. (this has been done.) Now, the thing is, when i click on the "Next" button, i want the browser to compare the value at the grandTotal TextBOx.. if the value is 0.00, it will redirect me to PAGE1. if the value is more than 0.00, it will redirect me to PAGE2. i've tried various ways (Using if.. else.. loop) but it seems to have some problem.. does anyone know how to solve this problem..? i need help here.. using asp .net 2.0, visual studio 2005, c# -DarkangeL-

    R 1 Reply Last reply
    0
    • C chubbie

      hi all.. thanks for the attention to this post.. i am facing some difficulty with my project and i need help. example, i have 3 textboxes (unitPrice, quantity and grandTotal) and a button (nextBtn). when the application is running, the user will key in some value inside unitPrice and quantity (for multiplication).. and the grandTotal will auto compute the product. (this has been done.) Now, the thing is, when i click on the "Next" button, i want the browser to compare the value at the grandTotal TextBOx.. if the value is 0.00, it will redirect me to PAGE1. if the value is more than 0.00, it will redirect me to PAGE2. i've tried various ways (Using if.. else.. loop) but it seems to have some problem.. does anyone know how to solve this problem..? i need help here.. using asp .net 2.0, visual studio 2005, c# -DarkangeL-

      R Offline
      R Offline
      RSArockiam
      wrote on last edited by
      #2

      post your code then it can be fix it easily. Regards R.Arockiapathinathan

      C 1 Reply Last reply
      0
      • R RSArockiam

        post your code then it can be fix it easily. Regards R.Arockiapathinathan

        C Offline
        C Offline
        chubbie
        wrote on last edited by
        #3

        the If.. Else.. code is this.. if (gtTextBox.Text == "0") { Server.Transfer("TBFund.aspx"); } else { Server.Transfer("MainPage.aspx"); } but somehow there is some error with it.. -DarkangeL-

        R 1 Reply Last reply
        0
        • C chubbie

          the If.. Else.. code is this.. if (gtTextBox.Text == "0") { Server.Transfer("TBFund.aspx"); } else { Server.Transfer("MainPage.aspx"); } but somehow there is some error with it.. -DarkangeL-

          R Offline
          R Offline
          RSArockiam
          wrote on last edited by
          #4

          You required numeric comparison instead of string comparison, so change the coding like follows: if (int.Parse(gtTextBox.Text) == 0) { Server.Transfer("TBFund.aspx"); } else { Server.Transfer("MainPage.aspx"); } Regards R.Arockiapathinathan

          C 1 Reply Last reply
          0
          • R RSArockiam

            You required numeric comparison instead of string comparison, so change the coding like follows: if (int.Parse(gtTextBox.Text) == 0) { Server.Transfer("TBFund.aspx"); } else { Server.Transfer("MainPage.aspx"); } Regards R.Arockiapathinathan

            C Offline
            C Offline
            chubbie
            wrote on last edited by
            #5

            thanks a million..!! it solves my problem.. -DarkangeL-

            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