how to read the upload file

Oct 7 2009 8:16 AM
string docName = fileupNewsLetter.FileName;
                            string ext = null;
                            string name = string.Empty;
                            int totlen = docName.Length;
                            int dot = docName.LastIndexOf('.');
                            int end = dot + 1;
                            int ending = totlen - end;
                            ext = docName.Substring(end, ending);
                            name = "Newletter" + IsRecordExist + "." + ext;
                            if (ext == "pdf")
                            {

                                fileupNewsLetter.PostedFile.SaveAs("C:\\Documents and Settings\\yogita\\Desktop\\Csinvestment\\Admin\\FreeNewsLetter\\" + name + "");
                                lblMsg.Text = "File Save successfully";
                            }
                            else
                            {
                                lblMsg.Text = "Not a Valid File Format only PDF file is allowed";
                            }

i have upload the file now i want to read the file so can any one tell me how to read the file.
i have taken one grid in that image button is thr so while clicking upon the image it will open tht file.

Answers (1)