简体   繁体   中英

How can we get First flash file data in asp.net (C#) after two or three form submission?

  • 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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM