I want to ask how to replace space by dash(-) in my Url. My Details action has a title url, the problem is that appears whitespace between words instead dash(-).
For Examble:
my url : ~/khoa-hoc/1/Lớp Luyện Thi
but I want:
        step1->  1.  ~/khoa-hoc/1/Lớp-Luyện-Thi
        step2->  2.  ~/khoa-hoc/1/lop-luyen-thi
my route
   my route routes.MapRoute( null,
      "khoa-hoc/{id}/{title}",
      new { controller = "Course", action = "Details", id = "", title=""},
      new { id = @"\d+" } );
my view: @Html.ActionLink(item.Name, "Details", new { id = item.CourseID, title=item.Title })
I have search some topics about this but until now I still have not solved this problem, hope someone can help me, Thank in advance, sorry for my english language not perfect.