Cheat Sheet for URL Rewriting
Dim Oldpath As String
Dim NewPath As String
Dim Incomming As HttpContext
Dim indx As Integer
Incomming = HttpContext.Current
Oldpath = Incomming.Request.Path
If Oldpath.StartsWith("/OrderProduct/") Then
Oldpath = Oldpath.Replace(".aspx", "")
Oldpath = Oldpath.Replace("/OrderProduct/", "")
indx = Oldpath.IndexOf("_")
Oldpath = Oldpath.Remove(0, indx + 1)
indx = Oldpath.IndexOf("_")
Oldpath = Oldpath.Remove(0, indx + 1)
NewPath = "/OrdeProduct.aspx?CategoryID=" & Oldpath & ""
Incomming.RewritePath(NewPath)
End If