Asp.Net Tutorial and Assignment no 8 for Beginner

ASP.Net Tutorials and Assignment no 8 with Program solution. Reaching out with the 8th assignment for ASP.net tutorial.  The topic cover all the program related with ASP.net. College student will get all the solution for college assignment here. It is the latest 2016 ASP.net assignment for engineering college students. Solved assignment for MCA, BCA, MSCIT, BSCIT and many Engineering College student. Find Solved Programs here.

[LinkVer]

Must Read : How To Spy on Girlfriend / Boyfriend Whatsapp Account

Must Read: Install Whatsapp with Rooted Andriod Phone

Lecture 4

Asp.Net Programming Assignment no 8 – ASP Tutorial for Beginners

[ResponsiveRect]

Objective:

Create a website and manage the Session state of your site also display the session id, Session time out & close the Session.

Controls, Methods, Properties & Event Used:

  1. Session State
  2. Label
  3. Button

Output:

ASP Tutorial on Session Id, Timeout Close

[ResponsiveRect]

Program:

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class frmSessionExample : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
int i = Convert.ToInt32(Session[“i”]);
i++;
Session[“i”] =i;
Session.Timeout = 1;
lbSession.Text = “Session ID:” + Session.SessionID + “<br>”;
lbSession.Text += “Session Timeout:” + Session.Timeout + “<br>”;
for (int ind = 0; ind < Session.Keys.Count; ind++)
{
lbSession.Text += Session.Keys[ind] + “:” + Session[ind] + “<br>”;
}
}
protected void btnSessionClose_Click(object sender,EventArgs e)
{
Session.Clear();//remove all session data
Session.Abandon();//end the session
}
}

Find More Tutorials Here

Find Tally Tutorial Here
Find Advance Excel Tutorial Here

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top