public ActionResult Edit(string param)
{
}
http://localhost/Edit/5,someothervalue,etc
How can i reach ‘param’ from a global function. Basically I am trying to access the parameter in my url from a statinc method that I am building which will be global. That method breaks down the parameter and returns id and other things that I am passing inside param
I think you’re looking for a way to get the route values from a given URL. Here’s some code that might help you do this with a URL string. Just note that I put a IRouteRegistrant interface that just has a Register function that takes a route collection. Basically replace that with your registration mechanism.
So to get at the values (for your param example) you just need the following:
Hope this helps.