i am performing ajax call on my .aspx page
Passing some values which contain characters like '/' , '&' , '-' , '.'
hence using encodeURIComponent
$('#divDialog').html('<p>Loading Please wait...</p>').dialog({ title: 'Processing Information', modal: true, resizable: false, draggable: false }).load('ajaxExecute.aspx?Fn=CAO2',
{
'EmploymentType': encodeURIComponent($('#cmbEmploymentType').val()), 'NatureIncome': encodeURIComponent($('#cmbIncomeNature').val())
},
function (response, status, xhr) {
$('#divDialog').dialog('close');
// Some Code
}
});
i am trying to get those values in c#
if (Request.Form["EmploymentType"] != "" && Request.Form["EmploymentType"] != null) string sEmpType = Convert.ToString(Request.Form["EmploymentType"]);
QuickWatch
Shows values in Convert.ToString(Request.Form["EmploymentType"])
As Car%2FTruck%2FBoat%2FPlane%20Dealer
I tried HttpUtility.UrlEncode(Convert.ToString(Request.Form["EmploymentType"]))
But Same result
How can i get string Car/Truck/Boat/Plane Dealer
As it is in variable ?