I have a huge HTML content in a string variable and I want to write that content to a text file using stream writer but the stream writer is truncating the text. It is not wrting the whole content to file. I am using the following code:-\[code\]using (StreamWriter sw = new StreamWriter(completeFilePath)){ sw.Write(Html);}\[/code\]where Html is the string type variable. Please help.