Just make sure you use the correct ID for the element, because that matters, you mention in your "What I have tried:" section,
Quote:
#textname is id for input
So, in that case the code would be like the following,
function InsertComment(id) {
$.ajax({
url: "/tickets/AddComment/" + id,
type: "GET",
data: {
text: $("#textname").val()
}
}).done(function () {
});
}
If this element is found, and returns a value, then you will get the text parameter filled in the query string as well.