Specialty Forums
Security and Virus
General Hardware
CPUs/Overclocking
Networking
Digital Photo/Video
Office Software
PC Gaming
Console Gaming
Programming
Database
Web Development
Digital Home

General Forums
Windows XP
Windows Vista
Windows 95/98
Windows Me
Windows NT
Windows 2000
Win Server 2008
Win Server 2003
Windows 3.1
Linux
PDAs
BeOS
Novell Netware
OpenVMS
Solaris
Disk Op. System
Unix
Mac
OS/2

Drivers
Driver Scan
Driver Forum

Software
Automatic Updates

BIOS Updates

My Computing.Net

Solution Center

Free IT eBook

Howtos

Site Search

Message Find

RSS Feeds

Install Guides

Data Recovery

About

Home
Reply to Message Icon Go to Main Page Icon

how to store and retrieve data from

Original Message
Name: hanusoftware
Date: July 22, 2007 at 23:27:35 Pacific
Subject: how to store and retrieve data from
OS: window 200
CPU/Ram: 256
Model/Manufacturer: intel
Comment:
//This example shows that how to store and retrieve data from cookies.
// http://www.hanusoftware.com

private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
if(!IsPostBack)
{
if(Request.Cookies["UserCook"] != null)
{
chkRemember.Checked = true;
HttpCookie cook = Request.Cookies["UserCook"];
txtUserName.Text = cook["UserName"].ToString();

}
}
}
private void btnSubmit_Click(object sender, System.EventArgs e)
{
try
{
if(chkRemember.Checked == true)
{
if(Request.Browser.Cookies == true)
{
HttpCookie loginCook = new HttpCookie("UserCook");
loginCook["UserName"] = txtUserName.Text.Trim();
loginCook.Expires = DateTime.MaxValue;
Response.Cookies.Add(loginCook);
}
else
{
lblErr.Text = "Please enable your cookies in Internet
option in Explorer.";
}
}
if(txtUserName.Text.Trim() == "developer" &&
txtPwd.Text.Trim() == "developer")
{
Session["UserId"] = txtUserName.Text.Trim();
Response.Redirect("Querystring.aspx?Usertype=Web Developer");
}
else if(txtUserName.Text.Trim()=="admin" && txtPwd.Text.Trim()== "admin")
{
Session["UserId"] = txtUserName.Text.Trim();
string str = Server.UrlEncode("Administrator+");

Response.Redirect("Querystring.aspx?UserType="+str);
}
else
{
lblErr.Text = "Invalid user id and password.";
}
}
catch(Exception ex)
{
Response.Write(ex.Message);
}
}
}
}

http://www.hanusoftware.com

Software Development India
http://www.hanusoftware.com


Report Offensive Message For Removal


Response Number 1
Name: Web developers
Date: July 23, 2007 at 02:31:22 Pacific
Subject: how to store and retrieve data from
Reply: (edit)
IS this message for information sake or do you need assistance in storing information in cookies ?

Chris, Director, Chrisranjana.com
http://www.chrisranjana.com


Report Offensive Follow Up For Removal

Response Number 2
Name: Laler
Date: July 29, 2007 at 12:54:51 Pacific
Subject: how to store and retrieve data from
Reply: (edit)
nvm

---
Fubar


Report Offensive Follow Up For Removal




Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: how to store and retrieve data from

Comments:

 
  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 


Data Recovery Software




XP Installed to G?

exessive internet traffic

ZoneAlarm Question. Blocked Connect

Windows Live Messenger Problem

Delete $Uninstall after SP3 updates


The information on Computing.Net is the opinions of its users. Such opinions may not be accurate and they are to be used at your own risk. Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE

All content ©1996-2007 Computing.Net, LLC