I\'m developing an ASP .Net MVC application. One of my actions requires id
as a parameter. For example:
public actionresult Detail(Guid id){
Bit of a late response but in case anyone reads this...
depending on the use, you can provided a shortened GUID value.
for instance, if the ID value is generated and given to the user as an Authentication Token sort of value then during the generation you could just take however many characters and compare it with other in use values. if any matches, then just generate a new one and re-compare until its unique.
This technique is also advisable if you trim a hash value of the GUID too.. just to be safe. In fact any time you randomly generate a value to be used as ID then you should make sure it is not 'already in use'