Ajax.ActionLink
has no overload that allows passing custom HTML attributes, and it's going to be hard to show/hide one or the other without being able to reference some id or class. You could, I suppose, wrap the link in a div or span, and then apply an id or class to that. That would actually probably be the safest and quickest course.
Once you have something you can select with, the JavaScript is trivial (I should say "the jQuery", as I always hate it when other people equate the two. But, ASP.NET MVC uses jQuery by default, so support can be assumed.):
$('#CheckBox').on('click', function () {
if ($(this).is(':checked')) {
$('#link1').show();
$('#link2').hide();
} else {
$('#link1').hide();
$('#link2').show();
}
});
FWIW, I would caution against the entire gamut of Ajax
helpers. Automagic code is great, but automagic AJAX code, I believe, is a step too far. There's too much going on there and it's all hidden from the developer. That's a recipe for disaster.