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. Other Discussions
  3. The Weird and The Wonderful
  4. Use session for pass value [modified]

Use session for pass value [modified]

Scheduled Pinned Locked Moved The Weird and The Wonderful
10 Posts 6 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.
  • K Offline
    K Offline
    Krirk
    wrote on last edited by
    #1

    My colleague wrote code for calculate total price and then save it he use session for sending total price to another Sub.This session use in Cal() and Save() only. Private Sub Cal() dim dblTotalPrice as Double dblTotalPrice= cint(me.txtQty.text) * cdbl(me.txtPricePerUnit.Text) session("TotalPrice") = dblTotalPrice End Sub Private Sub Save() dim dblTotalPrice as Double dblTotalPrice = session("TotalPrice") End Sub

    modified on Thursday, March 13, 2008 5:42 AM

    L V P R 4 Replies Last reply
    0
    • K Krirk

      My colleague wrote code for calculate total price and then save it he use session for sending total price to another Sub.This session use in Cal() and Save() only. Private Sub Cal() dim dblTotalPrice as Double dblTotalPrice= cint(me.txtQty.text) * cdbl(me.txtPricePerUnit.Text) session("TotalPrice") = dblTotalPrice End Sub Private Sub Save() dim dblTotalPrice as Double dblTotalPrice = session("TotalPrice") End Sub

      modified on Thursday, March 13, 2008 5:42 AM

      L Offline
      L Offline
      leppie
      wrote on last edited by
      #2

      Looks like useless code, delete it. See if he notices, when he does, tell him not write code that has no purpose.

      xacc.ide - now with IronScheme support
      IronScheme - 1.0 alpha 2 out now

      1 Reply Last reply
      0
      • K Krirk

        My colleague wrote code for calculate total price and then save it he use session for sending total price to another Sub.This session use in Cal() and Save() only. Private Sub Cal() dim dblTotalPrice as Double dblTotalPrice= cint(me.txtQty.text) * cdbl(me.txtPricePerUnit.Text) session("TotalPrice") = dblTotalPrice End Sub Private Sub Save() dim dblTotalPrice as Double dblTotalPrice = session("TotalPrice") End Sub

        modified on Thursday, March 13, 2008 5:42 AM

        V Offline
        V Offline
        Vasudevan Deepak Kumar
        wrote on last edited by
        #3

        Krirk wrote:

        session("TotalPrice")

        But are you sure he is not using it in a different context within the application like a different period or time.

        Vasudevan Deepak Kumar Personal Homepage
        Tech Gossips
        A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson

        1 Reply Last reply
        0
        • K Krirk

          My colleague wrote code for calculate total price and then save it he use session for sending total price to another Sub.This session use in Cal() and Save() only. Private Sub Cal() dim dblTotalPrice as Double dblTotalPrice= cint(me.txtQty.text) * cdbl(me.txtPricePerUnit.Text) session("TotalPrice") = dblTotalPrice End Sub Private Sub Save() dim dblTotalPrice as Double dblTotalPrice = session("TotalPrice") End Sub

          modified on Thursday, March 13, 2008 5:42 AM

          P Offline
          P Offline
          Paul Conrad
          wrote on last edited by
          #4

          Useless looking code. What was your colleague thinking?

          "I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon

          D V 2 Replies Last reply
          0
          • P Paul Conrad

            Useless looking code. What was your colleague thinking?

            "I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon

            D Offline
            D Offline
            DavidNohejl
            wrote on last edited by
            #5

            Paul Conrad wrote:

            What was your colleague thinking?

            "Almost weekend..." :-D


            [My Blog]
            "Visual studio desperately needs some performance improvements. It is sometimes almost as slow as eclipse." - Rüdiger Klaehn
            "Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe

            P 1 Reply Last reply
            0
            • D DavidNohejl

              Paul Conrad wrote:

              What was your colleague thinking?

              "Almost weekend..." :-D


              [My Blog]
              "Visual studio desperately needs some performance improvements. It is sometimes almost as slow as eclipse." - Rüdiger Klaehn
              "Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe

              P Offline
              P Offline
              Paul Conrad
              wrote on last edited by
              #6

              dnh wrote:

              "Almost weekend..."

              Yes, or... "Hmmmm, 4:45 Friday, I'll delete the dead code Monday" ( and gets sidetracked with a Monday morning meeting :-\ )

              "I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon

              1 Reply Last reply
              0
              • P Paul Conrad

                Useless looking code. What was your colleague thinking?

                "I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon

                V Offline
                V Offline
                Vasudevan Deepak Kumar
                wrote on last edited by
                #7

                Paul Conrad wrote:

                thinking

                Can he? He should have been in an inebriated state right?

                Vasudevan Deepak Kumar Personal Homepage
                Tech Gossips
                A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson

                P 1 Reply Last reply
                0
                • V Vasudevan Deepak Kumar

                  Paul Conrad wrote:

                  thinking

                  Can he? He should have been in an inebriated state right?

                  Vasudevan Deepak Kumar Personal Homepage
                  Tech Gossips
                  A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson

                  P Offline
                  P Offline
                  Paul Conrad
                  wrote on last edited by
                  #8

                  Quite possible...

                  "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

                  1 Reply Last reply
                  0
                  • K Krirk

                    My colleague wrote code for calculate total price and then save it he use session for sending total price to another Sub.This session use in Cal() and Save() only. Private Sub Cal() dim dblTotalPrice as Double dblTotalPrice= cint(me.txtQty.text) * cdbl(me.txtPricePerUnit.Text) session("TotalPrice") = dblTotalPrice End Sub Private Sub Save() dim dblTotalPrice as Double dblTotalPrice = session("TotalPrice") End Sub

                    modified on Thursday, March 13, 2008 5:42 AM

                    R Offline
                    R Offline
                    rameez nakash m k
                    wrote on last edited by
                    #9

                    hey would u please send me the source code of peer to peer internet caching.as iam an engg student and iam doing a project on that re.so please send me the source code of it ok.send to my id rameez_313 @yahoo.com

                    K 1 Reply Last reply
                    0
                    • R rameez nakash m k

                      hey would u please send me the source code of peer to peer internet caching.as iam an engg student and iam doing a project on that re.so please send me the source code of it ok.send to my id rameez_313 @yahoo.com

                      K Offline
                      K Offline
                      Krirk
                      wrote on last edited by
                      #10

                      I think you have incorrect place to post. :)

                      My blog

                      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