c# - Absolute path string has characters that break URL -


I am trying to get a full path and running a local HTML file in a web browser control.

  string exeFile = (new system.URI (Assembly.Net Entry (assembly). CodeBase). AbsolutePath; string exeDir = path.getDirectoryName (exeFile); string full path = path.combin (xidir , "Html \\ indexom"); This.webBrowser1.Url = new system.URI (fullpath, system.yurikind.assolute);   

This is not working because full path ends Happens:

c: \ users \ tunnelld2 \ documents \ visual% 20studio% 202012 \ Projects \ qTab2 \ qTab2 \ bin \ debug \ HTML \ index.html

I have several times Where This path appears true:

View% 20studio% 202012

If I use the string manually: "c: \ users \ tunnelld2 \ Documents \ visual studio 2012 \ projects \ qTab2 \ QTab2 \ bin \ debug \ html \ index.html "

This works fine how to remove% 20 from my string, so that I present the HTML page

  string exeFile = (new system.URI (assembly.gate entryassumband). Codebase, true)). AbsolutePath;   

You can specify a boole to avoid the URL.

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -