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 7410385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:13:37+00:00 2026-05-29T06:13:37+00:00

I have a form that I have users fill out and then it gets

  • 0

I have a form that I have users fill out and then it gets e-mailed to me.

I am trying to get an example of how I would create an ID (based on my own conventions) that I can use to keep track of responses (and send back to the user so they can reference it later).

This is the convention I am striving for:

[YEAR]-[SERVICE CODE]-[DATE(MMDD)]-[TIME]

For example: “2012-ABC-0204-1344”. I figured to add the TIME convention in the instance that two different users pick the same service on the same date rather than try to figure out how to only apply it IF two users picked the same service on the same date.

So, the scenario is that after the user goes through my wizards inputting their information and then click “Submit” that this unique ID would be created and attached to the model. Maybe something like @Model.UniqueID so that in an e-mail response I send to the user it shows up and says “Reference this ID for any future communication”.

Thanks for any advice/help/examples.

  • 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-29T06:13:38+00:00Added an answer on May 29, 2026 at 6:13 am

    In your post action

    
    [HttpPost]
    public ActionResult Create(YourModel model)
    {
       model.UniqueId = GenerateUniqueId(serviceCode); 
    }
    
    public string GenerateUniqueId(string serviceCode)
    {
       return string.Format("{0}-{1}-{2}", DateTime.Now.Year, serviceCode, Guid.NewGuid().ToString().Replace("-",""); //remove dashes so its fits into your convention
    }
    
    

    but this seems as I’m missing part of your question. If you really want unique, use a Guid. This is what we’ve used in the past to give to customers – a guid or a portion of one. IF you use a portion of one ensure you have logic to handle a duplicate key. You don’t need to worry about this though if using a full guid. If the idea is just to give to a customer then ignore the rest of the data and just use a guid, since it can easily be looked up in the database.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

On my site, I have a form that users fill out to become a
Okay all, I have a form that I want users to fill out. When
I have a form that a user would fill out while creating a ticket
i have a form that users can fill out and i need the users
I have an admin form that lets users create entities that require an image.
I want to create a custom form that a user can fill out for
I have a fairly simple website where users can fill out a form describing
I have a form that allows users to enter a date of birth: ie:
I have a dynamic form that adds users to the site, made so you
I have a website form that collects url of users to store in a

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.