Results 1 to 5 of 5

Thread: Asp

  1. #1
    Join Date
    Nov 2003

    Unanswered: Asp

    hai friends,
    i am new to ASP and i am developing a custom based application.
    but i strucked with a problem. while navigating from one page to another
    the contents in the previous page controls are cleared.
    but hhese values are required while coming back to that page.
    please any one solve my problem with a better explanation.

    waiting for reply....

  2. #2
    Join Date
    Feb 2002
    This is the nature of a stateless protocol. If you used, it has viewstate which maintains the state. However, since you are using asp, you will have to maintain the state yourself - using form variables, session object, cookies, querystring parameters or a database.

    How long do you need to maintain the state of these fields ? Do you have multiple pages with different fields that need to be maintained ? How many fields need to be maintained ? What exactly is the purpose for maintaining the state ?

  3. #3
    Join Date
    Nov 2003
    if you need to have a var that you're gonna use on every page, you can use Session("yourVar") to output it everywhere you need. However, I don't know what your secutity concerns are, but never trust a seesion var, alawys check it before using it, specially against a db

  4. #4
    Join Date
    Oct 2003


    Let's elaborate on this idea a little bit, shall we?

    The HTTP protocol is "stateless" in the sense that the server has no memory of what it has done in the past. Each and every request for a web-page is a brand new day.

    When you are building an application involving web pages (by whatever means), you must use some kind of a mechanism that allows you to save information somewhere on the server upon the completion of one request, then locate and retrieve that information when you receive the next request from that same user. (This set of stored inforamtion is called "a session.")

    This means that you must have some way of identifying the session. This is done by a "session ID" string that can be passed in a hidden form-variable, a cookie, as part of the HTML string, or (usually) some combination of these methods.

    You'll find that all web-pages, ASP or PHP or whatever, use these techniques constantly. (So does, for that matter...) Each tool provides a different means of doing this task "easily."
    ChimneySweep(R): fast, automatic
    table repair at a click of the

  5. #5
    Join Date
    Nov 2003
    I would also add that bandwidth is a resource that sessions eat. if you have really a lot of users at the same time and you have many items in a session variable for each user, your visitors might see a change in the speed in which pages load. However, you shouldn't face such a problem unless you have thousands of users. I used the word "might" because preformance is related to the available bandwitdth and server memory. So choose a good host
    Last edited by jeskel; 11-30-03 at 15:14.

Posting Permissions

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