handle url in asp.net mvc of invalid characters
<p>I create a details page in asp.net mvc. and work such as stack url for this example question .
<a href="https://stackoverflow.com/questions/36003787/replacement-of-a-jpanel-element-without-adding-to-the-end-of-the-panel">Replacement of a JPanel element without adding to the end of the panel?</a></p>

<p>in the top url 36003787 is id and replacement-of-a-jpanel-element-without-adding-to-the-end-of-the-panel is a title of detalis page. 
now i not to create this url. i have a calss for generete url.
and But if you change stack url to <a href="https://stackoverflow.com/questions/36003787/replacement-of-a-jpanel-element-without-adding-to-the-end-of-the-panel">Replacement of a JPanel element without adding to the end of the panel?</a> * or . or ! and etc... 
stack find this url and then refresh page and remove invalid characters .(back to real url).
but my url address is <a href="http://localhost:11148/Content/GetContent/347/Samsung-apple" rel="nofollow noreferrer">http://localhost:11148/Content/GetContent/347/Samsung-apple</a> and it correct work. but i manual change in browser addressbar url to  <a href="http://localhost:11148/Content/GetContent/347/Samsung-apple" rel="nofollow noreferrer">http://localhost:11148/Content/GetContent/347/Samsung-apple</a> . or &amp; and etc page is refresh and not found GetContent action in Content controller.
plase view stack url and change this . i need this secanario for my project.</p>

<p>and my route config code
public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");</p>

<pre><code>        routes.MapRoute(
               name: "NewsTitleRoute",
               url: "Content/GetContent/ContentId/{title}",
               defaults: new
                   {
                       controller = "Content",
                       action = "GetContent",
                       id = UrlParameter.Optional,
                       title = UrlParameter.Optional
                   });
        routes.MapRoute(
            name: "Default",
            url: "{controller}/{action}/{id}",
            defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
        );
    }
</code></pre>

<p>and controller 
 public ActionResult GetContent(int ContentId, string title)
        {...}
please help Me. </p>