In my ASP.NET site, I have a redirect that redirects to a new URL.
The original URL is....
site.com/7201231234/First%20Last/campaign/7201231234/
After the redirect, the issue is with the URL (campaign%20 is the problem now)
site.com/7201231234/First%20Last/campaign%20/7201231234/
I have implemented some JavaScript to handle the redirection based on user selection. I am using a + symbol to concatenate strings. Is there a way to remove %20
and make it campaign/7201231234?
The JavaScript code used is shown below
<script>
//Change the Campaign
$("#CampaignID").change(function () {
window.location =
"http://localhost:53049/@ViewBag.Phone/@ViewBag.AgentName/" + $("#CampaignID option:selected").text() + "/@ViewBag.DNIS";
});
</script>