In this small tutorial I will show you how to create a GUID in your ASP.NET application.
But what is actually GUID is?
According to Wikipedia
So you can use the following code easily to generate a new GUID in your ASP.NET project.
But what is actually GUID is?
According to Wikipedia
A Globally Unique Identifier (GUID) is a unique reference number used as an identifier in computer software. The term GUID typically refers to various implementations of the universally unique identifier (UUID) standard.There are two ways to create a new GUID.
- Guid.NewGuid() [NewGuid() method]
- new Guid()
So you can use the following code easily to generate a new GUID in your ASP.NET project.
protected void btnGenerateGuid_Click(object sender, EventArgs e)
{
/* Createing a new Guid */
String guid = Guid.NewGuid().ToString();
/* Print the output */
Response.Write(guid.ToString());
}
0 comments:
Post a Comment