asp.net - .NET MVC5 Encoding and Decoding ID -


my routes works controller/action/id wont want show id part directly coz specific personal number , how can encode , decode id helps..

public class user {     public user()    {        userid = guid.newguid();    }     public guid userid {get; set;}    public int personalnumber {get; set;} } 

your url looks like:

http://www.website.com/controller/action/73b56796-6a41-4433-b5c1-c20daaa17fc9 

Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

Nuget pack csproj using nuspec -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -