Click here to Skip to main content
15,915,603 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello friends ,

tell me how to convert this:

doctorfileupload.SaveAs(Server.MapPath("~/images2/" + FileName));

to string or session?



by doing this :

Session["pathname"]=doctorfileupload.tostring();
copying like this 'System.Web.UI.WebControls.FileUpload'.

pls tell me how to convert this into string.

thanking you
Posted
Updated 27-Dec-13 19:45pm
v2

C#
string cont_name = "";
            cont_name = doctorfileupload.FileName;
            string path = Server.MapPath("emp images/");
            doctorfileupload.SaveAs(path + cont_name);
            string FullPath = "emp images/" + cont_name;
 
Share this answer
 
Comments
Mr.VJ 28-Dec-13 3:25am    
thnq so much bro ;)
Try
<pre lang="cs">string readContents;
using (StreamReader streamReader = new StreamReader(path, Encoding.UTF8))
{
     readContents = streamReader.ReadToEnd();
}

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900