Post Profile






Could not find a part of the path while doing a File Copy

If at all possible, never give your code the opportunity to fail. If there's any possibility at all that you can prevent an error condition from being raised, do it. try{ if (!string.IsNullOrEmpty(FileName)) { string newPath = System.IO.Path.Combine(FilePath,...
read more

share

Related Posts


through fileupload control choose specific extension file

Programming / Windows Development : CodeProject

if(IsPostBack){Boolean fileOK=false;String fileExtention=System.IO.Path.GetExtension(FileUpload1.FileName).ToLower();   //check file

Crystal Reports: Fix for "Load report failed" error.

Programming / Windows Development : CodeProject

The problem: You want to display a Crystal Reports file programmatically on your website. When you try to open the report -- say, by calling the Load(Path) method of a ReportDocument object -- your code throws an exception with the ...

Comparing String.IsNullOrWhiteSpace and String.IsNullOrEmpty

Programming / Windows Development : CodeProject

Comparing String.IsNullOrWhiteSpace and String.IsNullOrEmpty

How to Toggle String Case in .NET

Programming / Windows Development : CodeProject

A whole lot less code and a lot easier to do.public static string ToggleCase(this string str){ if (string.IsNullOrEmpty(str)) return str; return string.Join("", (from i in str select (char.IsLetter(i) ?...

Updating a file in database

Programming / Windows Development : CodeProject

I am trying to update, but i get the error: Incorrect syntax near ','.My code look like this:public void UpdateAnyFileToFileTable(string filePath) { string filename = Path.GetFileName(filePath); int id = file.GetUserID(); string...

Comments




Copyright © 2015 Regator, LLC