In View we are going to create link using Html helper :
http://localhost:100/Home/ViewAddress?addressId=5f89a656-e98c-4680-b98f-6a3cf4ede7aa
We want to hide query string addressId and have only :
http://localhost:100/Home/ViewAddress/5f89a656-e98c-4680-b98f-6a3cf4ede7aa
The solution is to add new map route.
Open RouteConfig.cs file from App_Start folder and add new Map Route:
@Html.ActionLink("Address", "ViewAddress", new { addressId = Guid.NewGuid() })that will give us :
http://localhost:100/Home/ViewAddress?addressId=5f89a656-e98c-4680-b98f-6a3cf4ede7aa
We want to hide query string addressId and have only :
http://localhost:100/Home/ViewAddress/5f89a656-e98c-4680-b98f-6a3cf4ede7aa
The solution is to add new map route.
Open RouteConfig.cs file from App_Start folder and add new Map Route:
routes.MapRoute("ListingPreview", "Home/ViewAddress/{addressId}", new { controller = "Home", action = "ViewAddress", addressId= UrlParameter.Optional } );
No way...
ReplyDeleteStainless Steel Magnets - titanium arts
ReplyDeleteIroning casinosites.one the Stainless gri-go.com Steel Magnets (4-Pack). Made in Germany. The Titanium Arts ventureberg.com/ Stainless titanium flat iron Steel Magnets are https://septcasino.com/review/merit-casino/ an alloy made of steel in stainless steel