创建ASP.NET中的唯一网址 [英] Creating unique URLs in ASP.NET

查看:76
本文介绍了创建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:

URL缩短为ASP.NET

使用谷歌URL缩短API的ASP.NET MVC 3和C#

这篇关于创建ASP.NET中的唯一网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆