c# - How can I overwrite html file? -
this question has reply here:
write string text file , ensure overwrites existing content. 5 answersif (!system.io.file.exists(server.mappath(klasoradi + htmlname + ".html"))) { system.io.file.writealltext(server.mappath(klasoradi + htmlname + ".html"), htmltext); }
i'm using code creating , saving html file. can't overwrite file.
can please help me prepare situation ?
according msdn writealltext(string,string)
overwrite file. so, need remove initial if statement , either create file or overwrite it.
c# asp.net file overwrite
No comments:
Post a Comment