Error on path c#

Good day, I’m having an error like:

"An unhandled exception of type ‘System.NotSupportedException’ occurred in mscorlib.dll

Additional information: The given path’s format is not supported."

Below is my code:

report.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, @"C:\\temps\\" + textBox4 + ".pdf");

I’m beginner and willing to learn. Correct me if needed and I’m taking constructive criticism as well for learning purposes.

If I had to guess, textBox4 should be textBox4.Text or textBox4.Value, and by using textBox4, you are getting something like [System.Web.Control.TextBox] injected in the file path.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.