articles » current » asp-net-core » globally-unique-identifiers

ASP.NET Core: Globally Unique Identifiers

The GUID is great for anything requiring uniqueness; written in C# and VB.NET.

GUIDs are very useful for many tasks on websites. Generate a unique cookie, record identifier, file name, prevent forms from being posted twice, etc...

string guid = System.Guid.NewGuid().ToString("N");
Dim guid As String
guid = System.Guid.NewGuid().ToString("N")

This site uses cookies. Cookies are simple text files stored on the user's computer. They are used for adding features and security to this site. Read the privacy policy.