Je veux lire le contenu du fichier. Mais ce code n'aide pas.pour afficher le fichier doc au format texte asp.net C#
string[] readText = File.ReadAllLines(path); this line is giving error.
protected void btnRead_Click(object sender, EventArgs e)
{
string path = fileupload1.PostedFile.FileName;
if (!string.IsNullOrEmpty(path))
{
string[] readText = File.ReadAllLines(path);
StringBuilder strbuild = new StringBuilder();
foreach (string s in readText)
{
strbuild.Append(s);
strbuild.AppendLine();
}
textBoxContents.Text = strbuild.ToString();
}
}
type de fichier u r lecture (* txt?) – andy
Voulez-vous lire le fichier au moment du téléchargement? – Priya
Je veux lire doc file.help me – Akshada