Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 895147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T14:30:51+00:00 2026-05-15T14:30:51+00:00

i want to add 3 serial key to client system using httpcookie when he

  • 0

i want to add 3 serial key to client system using httpcookie when he visited my website
my website off course in asp.net MVC

but

serial key is different different not same.

when i add a 4th cookie then 1 key is automatically deleted.

how i can do this.

when user want to see then he can see recent 3 key.

Are you know how to add this cookie to client system by asp.net mvc website.

how i can add key1 , key 2 , key3 to client system.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T14:30:52+00:00Added an answer on May 15, 2026 at 2:30 pm

    Here’s how you can do that.

    Writing the serial-keys.

    //create a cookie
    HttpCookie SerialKeys = new HttpCookie("SerialKeys");
    
    //Add serial-key-values in the cookie
    SerialKeys.Values.Add("key1", "your-first-serialkey");
    SerialKeys.Values.Add("key2", "your-second-serialkey");
    SerialKeys.Values.Add("key3", "your-third-serialkey");
    SerialKeys.Values.Add("key4", "your-fourth-serialkey");
    
    //set cookie expiry date-time. Made it to last for next 12 hours.
    SerialKeys.Expires = DateTime.Now.AddHours(12);
    
    //Most important, write the cookie to client.
    Response.Cookies.Add(SerialKeys);
    

    Reading the serial-key cookie.

    //Assuming user comes back after several hours. several < 12.
    //Read the cookie from Request.
    HttpCookie SerialKeys = Request.Cookies["SerialKeys"];
    if (SerialKeys == null)
    {
        //No cookie found or cookie expired.
        //Handle the situation here, Redirect the user or simply return;
    }
    
    //ok - cookie is found.
    //Gracefully check if the cookie has the key-value as expected.
    if (!string.IsNullOrEmpty(SerialKeys.Values["key1"]))
    {
        string serialKey = SerialKeys.Values["key1"].ToString();
        //Yes key1 is found. Mission accomplished.
    }
    
    if (!string.IsNullOrEmpty(SerialKeys.Values["key2"]))
    {
        string serialKey = SerialKeys.Values["key2"].ToString();
        //Yes key2 is found. Mission accomplished.
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 453k
  • Answers 453k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Surely there's some way to tell XML that it's CONTENT,… May 15, 2026 at 9:30 pm
  • Editorial Team
    Editorial Team added an answer Think through what happens the first time you try to… May 15, 2026 at 9:30 pm
  • Editorial Team
    Editorial Team added an answer I've solved this EXACT issue by using the latest jqueryui… May 15, 2026 at 9:30 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.