Monday, October 24, 2016

How to transfer multiple values from one Page to other using Session as Class?





Step1: Page A

StudentsClass object= new StudentsClass()
        {
            Name= txtName.Text,
            Class = txtClass.Text,
       };

Session["Stu"]=object;

Step2: Page B

StudentsClass obj= (StudentsClass)Session["Stu"];

string name = obj.txtName;
string class  = obj.txtClass;



No comments:

Post a Comment

Secure you Asp .NET by Web.config & Global.ascx?

Add to Global.ascx protected void Application_BeginRequest(object sender,EventArgs e)     {         //to remove x frame         Resp...