Hi ' I'm gonna to apply the mixture of Id and slug as a url in my blog url like this
http://stackoverflow.com/questions/16286556/using-httpclient-to-log-in-to-hpps-server
to do this I have defined this Url in my global.asax
routes.MapRoute("IdSlugRoute", "{controller}/{action}/{id}/{slug}",
new {controller = "Blog", action = "Post", id = UrlParameter.Optional,slug=""});
but when I run my application Url is look like this :
http://localhost:1245/Blog/Post?postId=dd1140ce-ae5e-4003-8090-8d9fbe253e85&slug=finally-i-could-do-solve-it
I don't want to have those ? and = in Url ! I just wanna to separate them by slash how can I do about this please ??
bu the way the actionresult that returns this Url is this :
public ActionResult Post(Guid postId,string slug)
{
var post = _blogRepository.GetPostById(postId);
return View("Post",post);
}