Session variable VS HREF parameters...

Discussion in 'ASP .Net' started by +The_Taco+, Feb 6, 2004.

  1. +The_Taco+

    +The_Taco+ Guest

    I already use session variable in my project to set a session timeout when
    the user doesn't do anything for 10 minutes.

    When I call other pages, I often use parameters in HREF link.

    I was wondering if it was better to pass parameter from page to page as
    session variable instead of doing it in HREF link?

    Thx for the hint !
    +The_Taco+, Feb 6, 2004
    #1
    1. Advertising

  2. The first part of your message is very confusing to me, as Sessions time out
    all by themselves. However, I can help you with your other question.

    > When I call other pages, I often use parameters in HREF link.
    >
    > I was wondering if it was better to pass parameter from page to page as
    > session variable instead of doing it in HREF link?


    You have a couple of issues here. When you pass data via URL, you are
    exposing it to the user, which can be a security risk, so one consideration
    is how sensitive the data is. If it's not sensitive, you're fine, as long as
    you make sure that the user can't create a parameterized URL that would
    cause some problem. One of the advantages of using QueryString parameters is
    that the user can bookmark a dynamic page, as the bookmark will have the
    parameters in it.

    As for Sessions, they can be problematic as well, since they time out after
    a certain interval of inactivity. As long as you make sure to handle this
    eventuality, Session is fine.

    --
    HTH,
    Kevin Spencer
    ..Net Developer
    Microsoft MVP
    Big things are made up
    of lots of little things.


    "+The_Taco+" <> wrote in message
    news:...
    > I already use session variable in my project to set a session timeout when
    > the user doesn't do anything for 10 minutes.
    >
    > When I call other pages, I often use parameters in HREF link.
    >
    > I was wondering if it was better to pass parameter from page to page as
    > session variable instead of doing it in HREF link?
    >
    > Thx for the hint !
    >
    >
    Kevin Spencer, Feb 6, 2004
    #2
    1. Advertising

  3. I think he means that he is using session as a crewd way to timeout a user
    by setting session.timeout = 10 and checking for it on each postback.



    --
    Regards,
    Alvin Bruney [ASP.NET MVP]
    Got tidbits? Get it here...
    http://tinyurl.com/3he3b
    "Kevin Spencer" <> wrote in message
    news:%23%23MS0$...
    > The first part of your message is very confusing to me, as Sessions time

    out
    > all by themselves. However, I can help you with your other question.
    >
    > > When I call other pages, I often use parameters in HREF link.
    > >
    > > I was wondering if it was better to pass parameter from page to page as
    > > session variable instead of doing it in HREF link?

    >
    > You have a couple of issues here. When you pass data via URL, you are
    > exposing it to the user, which can be a security risk, so one

    consideration
    > is how sensitive the data is. If it's not sensitive, you're fine, as long

    as
    > you make sure that the user can't create a parameterized URL that would
    > cause some problem. One of the advantages of using QueryString parameters

    is
    > that the user can bookmark a dynamic page, as the bookmark will have the
    > parameters in it.
    >
    > As for Sessions, they can be problematic as well, since they time out

    after
    > a certain interval of inactivity. As long as you make sure to handle this
    > eventuality, Session is fine.
    >
    > --
    > HTH,
    > Kevin Spencer
    > .Net Developer
    > Microsoft MVP
    > Big things are made up
    > of lots of little things.
    >
    >
    > "+The_Taco+" <> wrote in message
    > news:...
    > > I already use session variable in my project to set a session timeout

    when
    > > the user doesn't do anything for 10 minutes.
    > >
    > > When I call other pages, I often use parameters in HREF link.
    > >
    > > I was wondering if it was better to pass parameter from page to page as
    > > session variable instead of doing it in HREF link?
    > >
    > > Thx for the hint !
    > >
    > >

    >
    >
    Alvin Bruney [MVP], Feb 6, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. CRON
    Replies:
    24
    Views:
    200,705
    Adrienne Boswell
    Jun 20, 2006
  2. Soren Vejrum
    Replies:
    4
    Views:
    577
    Lasse Reichstein Nielsen
    Jul 5, 2003
  3. saiho.yuen
    Replies:
    3
    Views:
    421
    kaeli
    Sep 14, 2004
  4. Replies:
    2
    Views:
    462
  5. Vincent van Beveren

    BASE HREF and A HREF="#" onclick="..."

    Vincent van Beveren, Jul 6, 2006, in forum: Javascript
    Replies:
    2
    Views:
    313
    Vincent van Beveren
    Jul 6, 2006
Loading...

Share This Page