Friday, 7 September 2012

Delete Multiple Cookies in Sign out button click


            HttpCookie aCookie;
            string cookieName;
            int limit = Request.Cookies.Count;
            for (int i = 0; i < limit; i++)
            {
                cookieName = Request.Cookies[i].Name;
                aCookie = new HttpCookie(cookieName);
                aCookie.Expires = DateTime.Now.AddDays(-1);
                Response.Cookies.Add(aCookie);
            }

       
            Response.Redirect("/myhomepage.aspx");


Find Mastepage Control in webpage:


Page.Master.FindControl("idname").Visible = false;

No comments:

Post a Comment

Convert SVG to PNG using svg.dll

      <div id="divsvg">        <svg width="350" height="300"><defs></defs> ............