Run Code
|
Code Wall
|
Users
|
Misc
|
Feedback
|
About
|
Login
|
Theme
|
Privacy
Encode URl C#
//Title of this code //Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; using System.IO; namespace Rextester { public class Program { public static void Main(string[] args) { string URL =@"C:/Merchant%20Documents//MSP+Certificatead\74e326-a993-43bc-aa52-4bad4e7f769c.pdf"; string Extension = Path.GetExtension(URL); string nameWithOutExtension = Path.GetFileNameWithoutExtension(URL); int IndexOfLastSlash = URL.LastIndexOf(nameWithOutExtension); string path = ""; if (IndexOfLastSlash > -1) { path = URL.Substring(0,IndexOfLastSlash); } //nameWithOutExtension = System.Web.HttpContext.Current.Server.UrlEncode(nameWithOutExtension); Console.WriteLine( path); Console.WriteLine( nameWithOutExtension ); Console.WriteLine( Extension); } } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
oooo
MidtermsGame_Rampage_12Geronimo
Possible Maximum
Fórum ➡ GroupJoin ➡ Join ➡ Easily ‼
Triple DES
1. soru
Display the pattern like diamond by using c# for loop
Palindrome Number
String concat operation (+) vs StringBuilder
MostFrequent
Please log in to post a comment.