Im wrkng on a small project Im creating a web app which consists of
NAME
EMAIL
AGE
PHONENO
Fileupload(toolbox)
showFile(Hyperlink)
after user entering the data above and upoaded the file when he clicks on the ShowFile link the page shoul dispaly the pdf file and uploaded file can any 1 help me with this
i had succeded upto upoad file
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
if ((FileUpload1.PostedFile != null) && (FileUpload1.PostedFile.ContentLength > 0))
{
string fn = System.IO.Path.GetFileName(FileUpload1.PostedFile.FileName);
string SaveLocation = Server.MapPath(".") + "\\" + fn;
try
{
FileUpload1.PostedFile.SaveAs(SaveLocation);
Label6.Text = "File Uploaded Successfully...";
}
catch (Exception ex)
{
Response.Write("Error: " + ex.Message);
}
}
else
{
Label6.Text = "Upload .pdf File";
}
}
}