Вот готовый пример:
Класс для перезаписи адресов
using System;
namespace Aisha
{
public static class StringExtensions
{
#region ToTranslit
public static string ToTranslit(this string text)
{
string translet = text.Replace("й", "j").
Replace("Й", "J").Replace("С++", "C_plus_plus").
Replace("ц", "c").Replace("Ц", "C").
Replace("у", "u").Replace("У", "U").
Replace("к", "k").Replace("К", "K").
Replace("е", "e").Replace("Е", "E").
Replace("н", "n").Replace("Н", "N").
Replace("г", "g").Replace("Г", "G").
Replace("ш", "sh").Replace("Ш", "Sh").
Replace("щ", "sch").Replace("Щ", "Sch").
Replace("з", "z").Replace("З", "Z").
Replace("х", "h").Replace("Х", "X").
Replace("ъ", "j").Replace("Ъ", "J").
Replace("ф", "f").Replace("Ф", "F").
Replace("ы", "i").Replace("Ы", "I").
Replace("в", "v").Replace("В", "V").
Replace("а", "a").Replace("А", "A").
Replace("п", "p").Replace("П", "P").
Replace("р", "r").Replace("Р", "R").
Replace("о", "o").Replace("О", "O").
Replace("л", "l").Replace("Л", "L").
Replace("д", "d").Replace("Д", "D").
Replace("ж", "gh").Replace("Ж", "Gh").
Replace("э", "e").Replace("Э", "E").
Replace("я", "yu").Replace("Я", "Yu").
Replace("ч", "ch").Replace("Ч", "Ch").
Replace("с", "s").Replace("С", "S").
Replace("м", "m").Replace("М", "M").
Replace("и", "i").Replace("И", "I").
Replace("т", "t").Replace("Т", "T").
Replace("ь", string.Empty).Replace("Ь", string.Empty).
Replace("б", "b").Replace("Б", "B").
Replace("ю", "yu").Replace("Ю", "Yu").
Replace("ё", "e").Replace("Ё", "E").
Replace("`", string.Empty).Replace("!", string.Empty).
Replace("$", string.Empty).Replace("%", string.Empty).
Replace("^", string.Empty).Replace("&", string.Empty).
Replace("*", string.Empty).Replace("(", string.Empty).Replace(")", string.Empty).
Replace("-", "_").Replace("=", "_ravno").Replace("+", "_plus").
Replace("~", string.Empty).Replace("[", string.Empty).Replace("]", string.Empty).
Replace("{", string.Empty).Replace("}", string.Empty).
Replace(":", string.Empty).Replace(";", string.Empty).
Replace("'", string.Empty).Replace("\"", string.Empty).
Replace("'", string.Empty).Replace("<", string.Empty).Replace(">", string.Empty).
Replace(",", string.Empty).Replace(".", string.Empty).Replace("/", string.Empty).
Replace("?", string.Empty).Replace(" ", "_").Replace("C#", "CSharp");
return translet;
}
public static string GetUrl(string url, object id)
{
return GetUrl(url, id, null);
}
public static string GetUrl(string url, object id, object title)
{
if (title != null)
{
if (title.ToString().Length > 200)
{
return string.Format("/{0}/{1}-{2}", url, title.ToString().Remove(200).ToTranslit(), id);
}
return string.Format("/{0}/{1}-{2}", url, title.ToString().ToTranslit(), id);
}
return string.Format("/{0}/{1}", url, id);
}
public static string GetUrlPr(string url, object id)
{
return GetUrlPr(url, id, null);
}
Далее global
<%@ Application Language="C#" %>
<%@ Import Namespace="System.Web.Routing" %>
<%@ Import Namespace="System.Web.Http" %>
<script RunAt="server">
void RegisterRoutes(RouteCollection routes)
{
routes.MapPageRoute("steelSpark", "steelSpark/{id}", "~/steelSpark/View.aspx");
}
</script>
И web config
<system.webServer>
<!--Для подключения библиотеки Routing-->
<validation validateIntegratedModeConfiguration="false"/>
<modules runAllManagedModulesForAllRequests="true"/>
Пример == http://admamr.ru/steelSpark/129
.aspx
? (Если такое возможно.)