The easiest way to do this is not to change routes, but change your action's parameter:
public static List<pligramdatamodel> getalldata1(string id) {
...
where u.tid == id
...
}
The route parameters will map the values in the url into the variables that you establish in the url: property. In this case:
url: "{controller}/{action}/{id}"
ANOTHER APPROACH:
The controller and action variables are used by the handler itself to determine the correct object to create and which method to call on it. Generally everything after that is up to you. You could implement a new route if you wanted to, but you would need to add extra switches in there to prevent collisions, such as if you wanted methods for both getalldata1(string username) and getalldata1(int id).
If you didn't want to leverage the default route, for whatever reason, you could put a different route in, such as:
routes.MapRoute(
name: "ByName",
url: "{controller}/{action}/byname/{username}",
defaults: new { controller = "Home", action = "Index", username = UrlParameter.Optional }
);