views:

19

answers:

1
  • Our team working on flash/Asp.net shopping cart projects
  • In our projects we need to get previous flash file data.
  • After two or three form submission the first page flash file data are missing.
  • How can we maintain the state of flash file data?
  • If any idea please help our team to do the task
+2  A: 

ASP.NET allows you to save values using session state, a storage mechanism that is accessible from all pages requested by a single Web browser session. Therefore, you can use session state to store user-specific information. Session state is similar to application state, except that it is scoped to the current browser session. If different users are using your application, each user session has a different session state. In addition, if a user leaves your application and then returns later after the session timeout period, session state information is lost and a new session is created for the user. Session state is stored in the Session key/value dictionary.

//Storing UserName in Session

Session["UserName"] = txtUser.Text;

//Check weather session variable null or not

    if (Session["UserName"] != null)

    {

        //Retrieving UserName from Session

        lblWelcome.Text = "Welcome : " + Session["UserName"];

    }

    else

    {

     //Do Something else

    }

For more information Exploring Session in ASP.Net

amexn