Monthly Archives: August 2012

Cookies in ASP.Net

Cookies in ASP.Net C#

Cookies are small Pieces if text file, Stored on the Client Computer. There are many name of cookies like HTTP Cookie, Web Cookie, Browser Cookie, Session Cookie. Create Cookies
Response.Cookies["MeeraAcademy"].Value = txtvalue.Text;
Response.Cookies["MeeraAcademy"].Expires = DateTime.Now.AddYears(30);
Retrieve Cookies on web page

if (Request.Cookies["MeeraAcademy"] == null)
            TextBox1.Text = “No cookie found”;
            TextBox1.Text = Request.Cookies["MeeraAcademy"].Value;

Call JavaScript function from Codebehind in ASP.Net

How to Call JavaScript function from Codebehind in ASP.Net. Write javascript function at codebehind and call javascript function from button click event in