Question: In my MVC application I want to create a route such that when a user requests a URL starting with a prefix some specific action is invoked.

For example, I want a route that would map `processData{whatever}` onto an action so that when a user requests `processData`, `processData.asmx` or `processDataZOMG` or whatever else with `processData` prefix that action is invoked.

I tried the following route

```
routes.MapRoute(
    @"ProcessData", @"processData*", //<<<< note asterisk
    new { controller = @"Api", action = @"ProcessData" } );

```

but it doesn't match `processData` and anything with that prefix - route matching falls through and the request is redirected to the main page.

How do I make a route that matches all paths with a specific prefix onto a specific controller-action pair?

Answer: 
From the [documentation](http://api.jquery.com/length/) you can use length or size(). You can chain jquery selectors with [find](http://api.jquery.com/find/) to count the inner spans. For example,

```
<script>
  var n = $(".x").find("span").length;
  alert(n);
</script>

```
You could use this for example:

```
$('#showTotalBarcodeCnt').html($("#barcodeLabelList").find("label").length);

```

Thanks