I need to URL encode an email address. If I do this (without URL encode), it works:
<!DOCTYPE html>
<head>
<title>Test</title>
</head>
<body>
<a href="https://www.example.com/reset-password?e=%7bEMAILADDRESS%7d">
</body>
</html>
The email address is printed raw, not URL-encoded.
What I'd really like to do is the following, but HttpUtility.UrlEncode()
doesn't execute:
<!DOCTYPE html>
<head>
<title>Test</title>
</head>
<body>
<a href="https://www.example.com/reset-password?e=HttpUtility.UrlEncode("%7bEMAILADDRESS%7d")">
</body>
</html>
Any suggestions on how to execute HttpUtility.UrlEncode() for usage in the above manner? Thanks for any help.