I am using IHttpHandler
to get data from a database
for filtering purpose. But, I am facing a problem with some filter values which contain special characters like "&"
,"/"
etc.
How can I pass those Filter values with Special Characters to Process Request?
UPDATED
function filter_Click(element_clicked) {
var colName = $(element_clicked).attr("data-id");
$.ajax({
type: "GET",
url: "../../Handlers/FilterValueHandler.ashx?ColumnName=" + colName + "&filter_text=" + $('#hndSelectedValue').val(),
processData: false,
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (response) {}
});
}
In the above code $('#hndSelectedValue').val()
is a hidden element whose value is using for filter which I have to send to the server for filtering. This value in JSON format
.
How can I pass those Filter values with Special Characters to Process Request?