创建ASP.NET中的唯一网址 [英] Creating unique URLs in ASP.NET
问题描述
在我的网站,我需要创建一个管理员用户将使用其发送给一组用户的唯一URL。每当管理员创建一个新的形式的唯一的URL创建。我明白我可以使用GUID来重新present唯一的网址,但我寻找的东西更短(希望周围4个字符,因为它更容易记住)。我将如何生成一个唯一的URL ASP.NET中的,将是这样的:
In my website, I need to create unique URLs that an admin user would use to send it to a group of users. The unique URL is created whenever an admin creates a new form. I understand I can use a guid to represent unique URLs, but I am looking for something shorter (hopefully around 4 characters, since it's easier to remember). How would I generate a unique URL in ASP.NET that would look like this:
http://mydomain.com/ABCD
我了解一些URL缩短网站(如bit.ly)做这样的事情在很短的唯一的URL。有没有一种算法可以使用吗?
I understand some of the URL shortener websites (like bit.ly) does something like this with a very short unique URL. Is there an algorithm I can use?
推荐答案
检查这些链接。希望你能找到他们有用的:
Check these links. Hope you find them helpful:
这篇关于创建ASP.NET中的唯一网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!