In call the following URL in Javascript.
var par = \"Participant.aspx?ID=\" + Id + \"&NAME=\" + Name+ \"&FIRSTNAME=\" + Firstname;
Some
You can use encodeURIComponent for the query string value and then set it as query string
var url = encodeURIComponent($("#<%=hdnPageQuery.ClientID%>").val());
var title = encodeURIComponent(document.title);
var redirectUrl = $("#<%=hdnPageTarget.ClientID%>").val();
var outputUrl = redirectUrl + '?url=' + url + '&title=' + title;
$('#ancSendToFriendLink').attr('href', outputUrl);