Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string foo = InkBunnyUrls.Login + "&username=" + txtUsername.Text + "&password=" + txtPassword.Password;
- //foo = https://inkbunny.net/api_login.php?output_mode=xml&username=test&password=foobar#1
- string url = System.Net.HttpUtility.HtmlEncode(foo);
- // url = https://inkbunny.net/api_login.php?output_mode=xml&username=test&password=foobar#1
- string foo = InkBunnyUrls.Login + "&username=" + txtUsername.Text + "&password=" + txtPassword.Password;
- //foo = https://inkbunny.net/api_login.php?output_mode=xml&username=test&password=foobar#1
- string url = Uri.EscapeUriString(foo);
- // https://inkbunny.net/api_login.php?output_mode=xml&username=test&password=foobar#1
- string encoded = HttpUtility.UrlEncode("#"); // "%23"
- string encoded = Uri.EscapeDataString("#"); // "%23"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement