Here in the code splittting the string and find if its legnth is greater than 2 then gets the controller and action name and redirects to right action method. Is there any better way to parse the db string ?
String abc = "/A/B/C.asp?Target=Z"; // getting this mvc string url from db
var target = abc.Split('/');
if (target.Length < 2) throw new Exception("unable to find link - Link: " + abc);
var controller = target[target.Length - 2];
var action = target[target.Length - 1];
return RedirectToAction(action, controller, menuModel);
//do something else