Anyway, here is how you can go about this in a few short lines of code
@Ajax.ActionLink("display", "Display", new AjaxOptions())
@Ajax.ActionLink("checks", "Sample", new AjaxOptions())
const string script = "$('#message').append('Display');";
string script = "var textboxvalue=$('#name').val();";
script += "$('#message').append(textboxvalue);";
1) Clicking on the first link will display Display in the message div.
2) Clicking on the second link will display mazhar in the message div.
Happy coding and see you here again 🙂