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. The Lounge
  3. Programming Preferences

Programming Preferences

Scheduled Pinned Locked Moved The Lounge
asp-netoraclecomquestion
24 Posts 14 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.
  • D Offline
    D Offline
    dan sh
    wrote on last edited by
    #1

    If you have to move to web page 2 on a button click on page one, and page 2 totally depends on data input by user on page one, what approach would you choose to share data between the pages? Would it be session or cross-post or something else? Any why?

    "Bastards encourage idiots to use Oracle Forms, Web Forms, Access and a number of other dinky web publishing tolls.", Mycroft Holmes[^]

    OriginalGriffO R Y A Richard DeemingR 8 Replies Last reply
    0
    • D dan sh

      If you have to move to web page 2 on a button click on page one, and page 2 totally depends on data input by user on page one, what approach would you choose to share data between the pages? Would it be session or cross-post or something else? Any why?

      "Bastards encourage idiots to use Oracle Forms, Web Forms, Access and a number of other dinky web publishing tolls.", Mycroft Holmes[^]

      OriginalGriffO Offline
      OriginalGriffO Offline
      OriginalGriff
      wrote on last edited by
      #2

      Session or cookies, depending on how non-volatile I wanted the data. I generally try to make data last as long as the user is probably going to need it - except security info, which never leaves the server so is session limited at best.

      The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)

      "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
      "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

      D K B 3 Replies Last reply
      0
      • OriginalGriffO OriginalGriff

        Session or cookies, depending on how non-volatile I wanted the data. I generally try to make data last as long as the user is probably going to need it - except security info, which never leaves the server so is session limited at best.

        The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)

        D Offline
        D Offline
        dan sh
        wrote on last edited by
        #3

        You sound like another advocate of Sessions are bad(sorry for being judgmental here). May I ask why so? I smell it kind of getting close to programming discussion.

        "Bastards encourage idiots to use Oracle Forms, Web Forms, Access and a number of other dinky web publishing tolls.", Mycroft Holmes[^]

        OriginalGriffO A 2 Replies Last reply
        0
        • D dan sh

          You sound like another advocate of Sessions are bad(sorry for being judgmental here). May I ask why so? I smell it kind of getting close to programming discussion.

          "Bastards encourage idiots to use Oracle Forms, Web Forms, Access and a number of other dinky web publishing tolls.", Mycroft Holmes[^]

          OriginalGriffO Offline
          OriginalGriffO Offline
          OriginalGriff
          wrote on last edited by
          #4

          Not at all - provided you don't stuff the whole video in there instead of a file name or similar they are very, very useful. But the persistence of cookies can have advantages, particularly if the user might want to use it tomorrow (or finish what he is doing later). Since session data is only persistent while the browser session is still open, and for a limit time (MS recommend no more than 20 minutes and that's not unreasonable) it makes a lot of sense to use cookies. I just don't store security info outside the server! I didn't know there was a "sessions are bad" faction - it's probably the same bunch as the "break in a loop is bad" faction.

          The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)

          "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
          "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

          D A 2 Replies Last reply
          0
          • D dan sh

            If you have to move to web page 2 on a button click on page one, and page 2 totally depends on data input by user on page one, what approach would you choose to share data between the pages? Would it be session or cross-post or something else? Any why?

            "Bastards encourage idiots to use Oracle Forms, Web Forms, Access and a number of other dinky web publishing tolls.", Mycroft Holmes[^]

            R Offline
            R Offline
            R Giskard Reventlov
            wrote on last edited by
            #5

            I always use Sessions (unless I'm trying to pass a huge object and then I'll just pass a reference to it instead).

            "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair. Those who seek perfection will only find imperfection nils illegitimus carborundum me, me, me me, in pictures

            D K 2 Replies Last reply
            0
            • D dan sh

              If you have to move to web page 2 on a button click on page one, and page 2 totally depends on data input by user on page one, what approach would you choose to share data between the pages? Would it be session or cross-post or something else? Any why?

              "Bastards encourage idiots to use Oracle Forms, Web Forms, Access and a number of other dinky web publishing tolls.", Mycroft Holmes[^]

              Y Offline
              Y Offline
              Yuriy Loginov
              wrote on last edited by
              #6

              I think query string is another option if your data is small. You can even wrap all your data inside a JSON object and then parse it on page 2. If the data is sensitive encode on page 1 and then decode on page 2.

              1 Reply Last reply
              0
              • D dan sh

                If you have to move to web page 2 on a button click on page one, and page 2 totally depends on data input by user on page one, what approach would you choose to share data between the pages? Would it be session or cross-post or something else? Any why?

                "Bastards encourage idiots to use Oracle Forms, Web Forms, Access and a number of other dinky web publishing tolls.", Mycroft Holmes[^]

                A Offline
                A Offline
                AspDotNetDev
                wrote on last edited by
                #7

                I would ask if they have to be two pages. If you control the logic on both pages, perhaps they could be combined into a single page with multiple steps (e.g., use a MultiView). In that case, just using data stored on the page (view state, hidden field, the input fields, or whatever) makes more sense.

                Thou mewling ill-breeding pignut!

                D 1 Reply Last reply
                0
                • D dan sh

                  You sound like another advocate of Sessions are bad(sorry for being judgmental here). May I ask why so? I smell it kind of getting close to programming discussion.

                  "Bastards encourage idiots to use Oracle Forms, Web Forms, Access and a number of other dinky web publishing tolls.", Mycroft Holmes[^]

                  A Offline
                  A Offline
                  AspDotNetDev
                  wrote on last edited by
                  #8

                  Session can be difficult/slow in a load balanced or cloud environment (such as web roles that don't use sticky load balancing). It does have its uses though.

                  Thou mewling ill-breeding pignut!

                  1 Reply Last reply
                  0
                  • A AspDotNetDev

                    I would ask if they have to be two pages. If you control the logic on both pages, perhaps they could be combined into a single page with multiple steps (e.g., use a MultiView). In that case, just using data stored on the page (view state, hidden field, the input fields, or whatever) makes more sense.

                    Thou mewling ill-breeding pignut!

                    D Offline
                    D Offline
                    dan sh
                    wrote on last edited by
                    #9

                    Few controls just don't go well together. For example, report viewer and ScriptManager(or Ajax, can't recall now). In those cases, I guess there's not much choice provided dynamic loading makes things a lot fragile.

                    "Bastards encourage idiots to use Oracle Forms, Web Forms, Access and a number of other dinky web publishing tolls.", Mycroft Holmes[^]

                    A 1 Reply Last reply
                    0
                    • OriginalGriffO OriginalGriff

                      Not at all - provided you don't stuff the whole video in there instead of a file name or similar they are very, very useful. But the persistence of cookies can have advantages, particularly if the user might want to use it tomorrow (or finish what he is doing later). Since session data is only persistent while the browser session is still open, and for a limit time (MS recommend no more than 20 minutes and that's not unreasonable) it makes a lot of sense to use cookies. I just don't store security info outside the server! I didn't know there was a "sessions are bad" faction - it's probably the same bunch as the "break in a loop is bad" faction.

                      The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)

                      D Offline
                      D Offline
                      dan sh
                      wrote on last edited by
                      #10

                      I am no ASP.Net guy but I have heard people chuckle after saying "He's using session".

                      "Bastards encourage idiots to use Oracle Forms, Web Forms, Access and a number of other dinky web publishing tolls.", Mycroft Holmes[^]

                      1 Reply Last reply
                      0
                      • D dan sh

                        Few controls just don't go well together. For example, report viewer and ScriptManager(or Ajax, can't recall now). In those cases, I guess there's not much choice provided dynamic loading makes things a lot fragile.

                        "Bastards encourage idiots to use Oracle Forms, Web Forms, Access and a number of other dinky web publishing tolls.", Mycroft Holmes[^]

                        A Offline
                        A Offline
                        AspDotNetDev
                        wrote on last edited by
                        #11

                        No AJAX/ScriptManager would be necessary. You can just do normal full page postbacks. If a control can't handle postbacks, I'd be pretty surprised.

                        Thou mewling ill-breeding pignut!

                        1 Reply Last reply
                        0
                        • OriginalGriffO OriginalGriff

                          Not at all - provided you don't stuff the whole video in there instead of a file name or similar they are very, very useful. But the persistence of cookies can have advantages, particularly if the user might want to use it tomorrow (or finish what he is doing later). Since session data is only persistent while the browser session is still open, and for a limit time (MS recommend no more than 20 minutes and that's not unreasonable) it makes a lot of sense to use cookies. I just don't store security info outside the server! I didn't know there was a "sessions are bad" faction - it's probably the same bunch as the "break in a loop is bad" faction.

                          The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)

                          A Offline
                          A Offline
                          AspDotNetDev
                          wrote on last edited by
                          #12

                          OriginalGriff wrote:

                          the "break in a loop is bad" faction

                          They are just afraid of Ivan Drago. Though, FYI, it's usually called a "ring", not a "loop".

                          Thou mewling ill-breeding pignut!

                          OriginalGriffO 1 Reply Last reply
                          0
                          • D dan sh

                            If you have to move to web page 2 on a button click on page one, and page 2 totally depends on data input by user on page one, what approach would you choose to share data between the pages? Would it be session or cross-post or something else? Any why?

                            "Bastards encourage idiots to use Oracle Forms, Web Forms, Access and a number of other dinky web publishing tolls.", Mycroft Holmes[^]

                            Richard DeemingR Offline
                            Richard DeemingR Offline
                            Richard Deeming
                            wrote on last edited by
                            #13

                            That depends. Do you need to run any logic from page 1 before you move to page 2? If not, just use <form action="page2.ext"> - you'll save the user a round-trip to the server.


                            "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                            "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

                            1 Reply Last reply
                            0
                            • A AspDotNetDev

                              OriginalGriff wrote:

                              the "break in a loop is bad" faction

                              They are just afraid of Ivan Drago. Though, FYI, it's usually called a "ring", not a "loop".

                              Thou mewling ill-breeding pignut!

                              OriginalGriffO Offline
                              OriginalGriffO Offline
                              OriginalGriff
                              wrote on last edited by
                              #14

                              They can leave my ring well alone! :laugh:

                              The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)

                              "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                              "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                              1 Reply Last reply
                              0
                              • R R Giskard Reventlov

                                I always use Sessions (unless I'm trying to pass a huge object and then I'll just pass a reference to it instead).

                                "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair. Those who seek perfection will only find imperfection nils illegitimus carborundum me, me, me me, in pictures

                                D Offline
                                D Offline
                                Duke Carey
                                wrote on last edited by
                                #15

                                mark merrens wrote:

                                unless I'm trying to pass a huge object

                                Perhaps more fiber in your diet would help

                                R 1 Reply Last reply
                                0
                                • OriginalGriffO OriginalGriff

                                  Session or cookies, depending on how non-volatile I wanted the data. I generally try to make data last as long as the user is probably going to need it - except security info, which never leaves the server so is session limited at best.

                                  The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)

                                  K Offline
                                  K Offline
                                  KRucker
                                  wrote on last edited by
                                  #16

                                  Keep in mind as well, for storing things in the session, you should not store objects that are not agile. (Agile objects being defined as... objects which do not maintain a reference to system resources, DB connections, open file handles, etc.). Session is also server dependant, if you use session to store objects, your server balancing must be a sticky balancing paradigm where once you hit a particular server, you remain with that server for the duration of the session.

                                  E 1 Reply Last reply
                                  0
                                  • D Duke Carey

                                    mark merrens wrote:

                                    unless I'm trying to pass a huge object

                                    Perhaps more fiber in your diet would help

                                    R Offline
                                    R Offline
                                    R Giskard Reventlov
                                    wrote on last edited by
                                    #17

                                    Thanks: I thought that was lost on everyone.

                                    "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair. Those who seek perfection will only find imperfection nils illegitimus carborundum me, me, me me, in pictures

                                    1 Reply Last reply
                                    0
                                    • K KRucker

                                      Keep in mind as well, for storing things in the session, you should not store objects that are not agile. (Agile objects being defined as... objects which do not maintain a reference to system resources, DB connections, open file handles, etc.). Session is also server dependant, if you use session to store objects, your server balancing must be a sticky balancing paradigm where once you hit a particular server, you remain with that server for the duration of the session.

                                      E Offline
                                      E Offline
                                      ENOTTY
                                      wrote on last edited by
                                      #18

                                      +1 And, of course, make sure that objects are serializable (like proper DTOs), so "the next guy" (which is yours truly) doesn't want to come after you wielding an axe because stuffing ListItemCollections and GridViewRows into Session makes the StateServer unhappy . :mad:

                                      1 Reply Last reply
                                      0
                                      • OriginalGriffO OriginalGriff

                                        Session or cookies, depending on how non-volatile I wanted the data. I generally try to make data last as long as the user is probably going to need it - except security info, which never leaves the server so is session limited at best.

                                        The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)

                                        B Offline
                                        B Offline
                                        BrainiacV
                                        wrote on last edited by
                                        #19

                                        My previous employer banned session variables. They projected millions of users and didn't want all that memory floating around for 20 minutes before being released in the case the user was just there for a second. Their other argument was that they were going to a server farm and didn't want to keep the sessions coordinated. The place I'm at now does not have that much traffic so Sessions are fine with us. Our problem is sessions timing out and the users complaining they lost their work will they were yakking on the phone. We use cookies as well, but not as much. Some of our users are still terrified of cookies and disable them. In worst cases we stash the data in a database record and pull it back later. Not a good solution either.

                                        Psychosis at 10 Film at 11 Those who do not remember the past, are doomed to repeat it. Those who do not remember the past, cannot build upon it.

                                        OriginalGriffO 1 Reply Last reply
                                        0
                                        • D dan sh

                                          If you have to move to web page 2 on a button click on page one, and page 2 totally depends on data input by user on page one, what approach would you choose to share data between the pages? Would it be session or cross-post or something else? Any why?

                                          "Bastards encourage idiots to use Oracle Forms, Web Forms, Access and a number of other dinky web publishing tolls.", Mycroft Holmes[^]

                                          S Offline
                                          S Offline
                                          StatementTerminator
                                          wrote on last edited by
                                          #20

                                          Actually, I normally prefer to use ViewState and stay on the same page, swapping elements on the button press. If I really have to pass data to a different page, I would normally use session variables. I don't like to use cookies for anything other than authentication, although they can be good for shopping carts and other things that you want to persist beyond the session.

                                          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