Adding a button that calls customdotnet dll methods

I can add a button to the Opportunity Details screen that appears in the third position of the buttons list on the right hand side of the screen. I can also add a button that calls a customdotnet dll method. However, what I am trying to achieve is a combination of the two, for example,

crm.addButton("", "Button", "CreateOrders", {
"index": 2,
"href": "#",
click: function() {
buttonaction;
}
});

where buttonaction = crm.url('insert custom action here').

Please can someone advise me if this is possible. If the syntax is not correct, please can you advise me what the syntax should be.

Many Thanks