c# - Convert a string into routeValues for call RedirectToAction -
is possible convert string routevalues?
per example:
return redirecttoaction("index", "home", new { id = 1});
to
return redirecttoaction("index", "home", "id = 1");
i needing because want save routevalues in database.
i read this: convert string (object) routevalues c# guy doesn't know if more supported way.
redirecttoaction
takes routevaluedictionary
might usable in case. you'd have construct little differently.
var routevals = new routevaluedictionary(){"id", "1"}; return redirecttoaction("index", "home", routevals);
Comments
Post a Comment