convert the bytearray file to string and dispay the file in a readable format in a web page

Feb 22 2011 1:23 AM
hi,

i convert the byte array file to a file in a readable format,when i display the file in a webpage it shows the content in unreadable format,how can i display the content in a readable format in webpage.if i use a word application it shows the correct answer.how can i dispaly it.here i attached my codings

rdr = cmd.ExecuteReader();{

while (rdr.Read()){

r2 = ((


FileStream fs = new FileStream("D:/karthi/resume/r1.txt", FileMode.Create);

fs.Write(r2, 0, r2.Length);

fs.Close();}


StreamReader str =null;

str = File.OpenText("D:/karthi/resume/r1.txt");


string content = str.ReadToEnd();

TextBox2.Text = content;
thank u

byte[])rdr["resume"]);

Answers (12)